修复消息重复问题

This commit is contained in:
2026-06-20 12:32:05 +08:00
parent 260bd12ec8
commit cfe4ef04d7
2 changed files with 17 additions and 6 deletions
+4
View File
@@ -384,6 +384,10 @@ const (
LLMMessageStatusError = "error"
)
// llmQueueProcessedDedupWindow 是 processed 消息软删除后仍参与去重的时间窗口。
// 处理完即软删除,但记录会保留至此窗口结束,防止网络延迟/重投导致同一包在刚处理完后又被重复入队。
const llmQueueProcessedDedupWindow = 15 * time.Second
type NodeInfoRecord struct {
NodeID string `gorm:"column:node_id;primaryKey;not null"`
NodeNum int64 `gorm:"column:node_num;not null;index"`