From a336e503660c6a8b10f80a273fc4c0c2124d0c62 Mon Sep 17 00:00:00 2001 From: ouqiang Date: Tue, 4 Apr 2017 17:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1-=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E6=97=B6,=E8=BF=94=E5=9B=9Enil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/task.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/task.go b/service/task.go index dadb2ae..e0f6320 100644 --- a/service/task.go +++ b/service/task.go @@ -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 {