diff --git a/internal/tools/conversation.go b/internal/tools/conversation.go index a517ece46..1cad58248 100644 --- a/internal/tools/conversation.go +++ b/internal/tools/conversation.go @@ -17,7 +17,7 @@ func (c *MsgTool) ConversationsDestructMsgs() { log.ZError(ctx, "get conversation id need destruct failed", err) return } - log.ZDebug(context.Background(), "nums conversations need destruct", len(conversations)) + log.ZDebug(context.Background(), "nums conversations need destruct", "nums", len(conversations)) for _, conversation := range conversations { log.ZDebug(ctx, "UserMsgsDestruct", "conversationID", conversation.ConversationID, "ownerUserID", conversation.OwnerUserID, "msgDestructTime", conversation.MsgDestructTime, "lastMsgDestructTime", conversation.LatestMsgDestructTime) seqs, err := c.msgDatabase.UserMsgsDestruct(ctx, conversation.OwnerUserID, conversation.ConversationID, conversation.MsgDestructTime, conversation.LatestMsgDestructTime) diff --git a/internal/tools/cron_task.go b/internal/tools/cron_task.go index 3c0f2e00e..f51724253 100644 --- a/internal/tools/cron_task.go +++ b/internal/tools/cron_task.go @@ -25,7 +25,7 @@ func StartCronTask() error { fmt.Println("start allConversationClearMsgAndFixSeq cron failed", err.Error(), config.Config.ChatRecordsClearTime) panic(err) } - log.ZInfo(context.Background(), "start msgDestruct cron task", "cron config", config.Config.ChatRecordsClearTime) + log.ZInfo(context.Background(), "start msgDestruct cron task", "cron config", config.Config.MsgDestructTime) _, err = c.AddFunc(config.Config.MsgDestructTime, msgTool.ConversationsDestructMsgs) if err != nil { fmt.Println("start conversationsDestructMsgs cron failed", err.Error(), config.Config.ChatRecordsClearTime)