添加日志打印

This commit is contained in:
陈景阳
2019-10-10 19:56:04 +08:00
parent 7fe2c9a425
commit 46d89c8cce
4 changed files with 19 additions and 8 deletions

View File

@@ -148,12 +148,12 @@ func ExecuteShellCmd(cmdStr string, cwd string, t model.Task, s model.Spider) (e
debug.PrintStack()
}
t.Status = constants.StatusCancelled
t.Error = "user kill the process ..."
} else {
// 保存任务
t.Status = constants.StatusFinished
}
t.FinishTs = time.Now()
t.Error = "user kill the process ..."
if err := t.Save(); err != nil {
log.Infof("save task error: %s", err.Error())
debug.PrintStack()