This commit is contained in:
Leufolium 2024-01-17 19:53:17 +08:00
parent 75b8d47ba9
commit 19953dddb3
1 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,10 @@ func NewCronService() *CronService {
//设置日志查看handler //设置日志查看handler
exec.LogHandler(customLogHandle) exec.LogHandler(customLogHandle)
//注册任务handler //注册任务handler
logger.Fatal(exec.Run()) if err := exec.Run(); err != nil {
logger.Error("xxl-job executor init fail: %v", err)
return
}
return new(CronService) return new(CronService)
} }