mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-09 06:02:54 +08:00
optimize scheduled deletion
This commit is contained in:
parent
cbb99d5c72
commit
7cdf02a33e
@ -39,13 +39,13 @@ func StartTask() error {
|
|||||||
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)
|
_, err = c.AddFunc(config.Config.ChatRecordsClearTime, msgTool.AllConversationClearMsgAndFixSeq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("start allConversationClearMsgAndFixSeq cron failed", err.Error(), config.Config.ChatRecordsClearTime)
|
log.ZError(context.Background(), "start allConversationClearMsgAndFixSeq cron failed", err)
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
log.ZInfo(context.Background(), "start msgDestruct cron task", "cron config", config.Config.MsgDestructTime)
|
log.ZInfo(context.Background(), "start msgDestruct cron task", "cron config", config.Config.MsgDestructTime)
|
||||||
_, err = c.AddFunc(config.Config.MsgDestructTime, msgTool.ConversationsDestructMsgs)
|
_, err = c.AddFunc(config.Config.MsgDestructTime, msgTool.ConversationsDestructMsgs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("start conversationsDestructMsgs cron failed", err.Error(), config.Config.MsgDestructTime)
|
log.ZError(context.Background(), "start conversationsDestructMsgs cron failed", err)
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
c.Start()
|
c.Start()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user