Test: pkg/task

This commit is contained in:
HFO4
2020-02-06 16:01:06 +08:00
parent 2b853dddd3
commit fc5b7d42c8
11 changed files with 707 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ func (worker *GeneralWorker) Do(job Job) {
defer func() {
// 致命错误捕获
if err := recover(); err != nil {
util.Log().Debug("任务执行出错,panic")
util.Log().Debug("任务执行出错,%s", err)
job.SetError(&JobError{Msg: "致命错误"})
job.SetStatus(Error)
}