feat: add scripts (#525)

This commit is contained in:
Xinwei Xiong
2023-07-13 11:37:23 +08:00
committed by GitHub
parent eb7953cacb
commit 7bf8a898e2
56 changed files with 2049 additions and 442 deletions
+11 -2
View File
@@ -34,10 +34,19 @@ func StartCronTask() error {
c := cron.New()
var wg sync.WaitGroup
wg.Add(1)
log.ZInfo(context.Background(), "start chatRecordsClearTime cron task", "cron config", config.Config.ChatRecordsClearTime)
log.ZInfo(
context.Background(),
"start chatRecordsClearTime cron task",
"cron config",
config.Config.ChatRecordsClearTime,
)
_, err = c.AddFunc(config.Config.ChatRecordsClearTime, msgTool.AllConversationClearMsgAndFixSeq)
if err != nil {
fmt.Println("start allConversationClearMsgAndFixSeq cron failed", err.Error(), config.Config.ChatRecordsClearTime)
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.MsgDestructTime)