diff --git a/controllers/task.go b/controllers/task.go index 666889f..4d1d381 100644 --- a/controllers/task.go +++ b/controllers/task.go @@ -117,9 +117,9 @@ func (self *TaskController) Copy() { self.ajaxMsg(err.Error(), MSG_ERR) } - if task.Status == 1 { - self.ajaxMsg("运行状态无法编辑任务,请先暂停任务", MSG_ERR) - } + //if task.Status == 1 { + // self.ajaxMsg("运行状态无法编辑任务,请先暂停任务", MSG_ERR) + //} self.Data["task"] = task self.Data["adminInfo"] = AllAdminInfo("") diff --git a/jobs/job.go b/jobs/job.go index dbc01ee..784dac6 100644 --- a/jobs/job.go +++ b/jobs/job.go @@ -573,6 +573,9 @@ func PollServer(j *Job) bool { server.Status = 1 server.Update() return false + } else { + server.Status = 0 + server.Update() } return true