计划任务定时器修改,改为通道顺序执行

This commit is contained in:
ayflying
2025-04-22 11:15:51 +08:00
parent 16da554a60
commit d6bfe1c2fb
3 changed files with 131 additions and 87 deletions

View File

@@ -34,6 +34,13 @@ type (
// @receiver s
// @return err
StartCron() (err error)
// AddFuncChan 添加方法到通道
AddFuncChan(list []func() error)
// RunFuncChan 统一执行方法
RunFuncChan()
// RunFunc 统一执行方法
// deprecated: 弃用会造成周期任务并发执行to service.SystemCron().AddFuncChan
RunFunc(list []func() error)
}
)