任务执行失败重试规则修改为, 每次等待N分钟后重试

pull/21/merge
ouqiang 2017-04-21 17:57:18 +08:00
parent 8fbdd7f81e
commit 9339137bca
1 changed files with 2 additions and 0 deletions

View File

@ -248,6 +248,8 @@ func execJob(handler Handler, taskModel models.TaskHost) TaskResult {
return TaskResult{Result: output, Err: err, RetryTimes: i}
}
i++
// 重试规则每次递增1分钟
time.Sleep( time.Duration(i) * 60 * time.Second)
if i < execTimes {
logger.Warnf("任务执行失败#任务id-%d#重试第%d次#输出-%s#错误-%s", taskModel.Id, i, output, err.Error())
}