mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 08:16:43 +00:00
update
This commit is contained in:
@@ -151,7 +151,7 @@ func (jm *JobManager) start() {
|
|||||||
|
|
||||||
/* monitor job execution */
|
/* monitor job execution */
|
||||||
for {
|
for {
|
||||||
res := jm.status()
|
//res := jm.status()
|
||||||
flag := false
|
flag := false
|
||||||
onlyPS := true
|
onlyPS := true
|
||||||
for i := range res.Status {
|
for i := range res.Status {
|
||||||
@@ -266,6 +266,7 @@ func (jm *JobManager) status() MsgJobStatus {
|
|||||||
|
|
||||||
err := spider.do()
|
err := spider.do()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
tasksStatus[i] = TaskStatus{Status: "unknown", State: map[string]interface{}{"ExitCode": float64(-1)}}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,12 +274,14 @@ func (jm *JobManager) status() MsgJobStatus {
|
|||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := ioutil.ReadAll(resp.Body)
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
tasksStatus[i] = TaskStatus{Status: "unknown", State: map[string]interface{}{"ExitCode": float64(-1)}}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
var res MsgTaskStatus
|
var res MsgTaskStatus
|
||||||
err = json.Unmarshal([]byte(string(body)), &res)
|
err = json.Unmarshal([]byte(string(body)), &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
tasksStatus[i] = TaskStatus{Status: "unknown", State: map[string]interface{}{"ExitCode": float64(-1)}}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
res.Status.Node = taskStatus.Node
|
res.Status.Node = taskStatus.Node
|
||||||
|
|||||||
Reference in New Issue
Block a user