From 6afe97330d6d2bd171f30a9fb0ae97554c0142b1 Mon Sep 17 00:00:00 2001 From: georgehao Date: Tue, 13 Aug 2019 23:20:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=89=A7=E8=A1=8C=E5=99=A8?= =?UTF-8?q?=EF=BC=88=E6=9C=8D=E5=8A=A1=E5=99=A8=EF=BC=89=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/task.go | 6 +++--- jobs/job.go | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) 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