From e83c0e06f94250bf7f8dfbbf28f8c26baa61cdca Mon Sep 17 00:00:00 2001 From: xyb <781028081@qq.com> Date: Thu, 23 Aug 2018 16:53:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=81=97=E6=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/job.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/job.go b/web/job.go index 0dd13b5..ee54974 100644 --- a/web/job.go +++ b/web/job.go @@ -352,9 +352,9 @@ func (j *Job) GetExecutingJob(ctx *Context) { } val := string(gresp.Kvs[i].Value) - m := make(map[string]interface{}) - json.Unmarshal([]byte(val), &m) - proc.Time, _ = time.Parse(time.RFC3339, m["time"].(string)) + var p cronsun.Process + json.Unmarshal([]byte(val), &p) + proc.Time, _ = time.Parse(time.RFC3339, p.Time) list = append(list, proc) } @@ -377,7 +377,7 @@ func (j *Job) KillExecutingJob(ctx *Context) { } if len(resp.Kvs) < 1 { - outJSONWithCode(ctx.W, http.StatusInternalServerError, "进程不存在") + outJSONWithCode(ctx.W, http.StatusInternalServerError, nil) return }