mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
feat: add scripts (#525)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user