定时任务-使用不支持的任务协议时,返回nil

pull/21/merge
ouqiang 2017-04-04 17:22:48 +08:00
parent 27eb3913c5
commit a336e50366
1 changed files with 3 additions and 0 deletions

View File

@ -156,6 +156,9 @@ func createHandlerJob(taskModel models.Task) cron.FuncJob {
case models.SSHScript:
handler = new(SSHScriptHandler)
}
if handler == nil {
return nil
}
taskFunc := func() {
taskLogId, err := createTaskLog(taskModel.Id)
if err != nil {