mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 08:16:43 +00:00
update
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strconv"
|
"strconv"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type JobManager struct {
|
type JobManager struct {
|
||||||
scheduler Scheduler
|
scheduler Scheduler
|
||||||
@@ -170,7 +170,7 @@ func (jm *JobManager) start() {
|
|||||||
} else {
|
} else {
|
||||||
log.Info(jm.job.Name, "-", i, " ", res.Status[i].Status)
|
log.Info(jm.job.Name, "-", i, " ", res.Status[i].Status)
|
||||||
if exitCode, ok := res.Status[i].State["ExitCode"].(float64); ok {
|
if exitCode, ok := res.Status[i].State["ExitCode"].(float64); ok {
|
||||||
if exitCode != 0 {
|
if exitCode != 0 && !jm.killedFlag {
|
||||||
log.Warn(jm.job.Name+"-"+jm.job.Tasks[i].Name+" exited unexpected, exitCode=", exitCode)
|
log.Warn(jm.job.Name+"-"+jm.job.Tasks[i].Name+" exited unexpected, exitCode=", exitCode)
|
||||||
jm.killedFlag = true
|
jm.killedFlag = true
|
||||||
jm.scheduler.UpdateProgress(jm.job, Failed)
|
jm.scheduler.UpdateProgress(jm.job, Failed)
|
||||||
|
|||||||
Reference in New Issue
Block a user