🎨 进程运行结束信号
This commit is contained in:
parent
2b50910784
commit
763e140775
|
@ -166,7 +166,6 @@ func RunHandler(w http.ResponseWriter, r *http.Request, channel map[string]*util
|
||||||
}()
|
}()
|
||||||
|
|
||||||
after := time.After(5 * time.Second)
|
after := time.After(5 * time.Second)
|
||||||
channelRet["cmd"] = "run-done"
|
|
||||||
kill := false
|
kill := false
|
||||||
select {
|
select {
|
||||||
case <-after:
|
case <-after:
|
||||||
|
@ -189,6 +188,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request, channel map[string]*util
|
||||||
logger.Debugf("User [%s, %s] done running [id=%s, file=%s, kill=%v]", wSession.UserId, sid, rid, filePath, kill)
|
logger.Debugf("User [%s, %s] done running [id=%s, file=%s, kill=%v]", wSession.UserId, sid, rid, filePath, kill)
|
||||||
|
|
||||||
if nil != wsChannel {
|
if nil != wsChannel {
|
||||||
|
channelRet["cmd"] = "run-done"
|
||||||
wsChannel.WriteJSON(&channelRet)
|
wsChannel.WriteJSON(&channelRet)
|
||||||
wsChannel.Refresh()
|
wsChannel.Refresh()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue