From 8058946f14e7ac09fa528c74866373a126c168d6 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 16 May 2019 13:46:53 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=89=A7=E8=A1=8C=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- output/run.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/output/run.go b/output/run.go index 676bf1e..805052e 100644 --- a/output/run.go +++ b/output/run.go @@ -260,7 +260,12 @@ func RunHandler(w http.ResponseWriter, r *http.Request) { } cmd.Wait() - logger.Warn("process", cmd.ProcessState) + if 124 == cmd.ProcessState.ExitCode() { + channelRet["cmd"] = "run-done" + channelRet["output"] = "run program timeout" + wsChannel.WriteJSON(&channelRet) + wsChannel.Refresh() + } }(rand.Int()) }