mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-07 22:31:55 +00:00
update
This commit is contained in:
parent
2e0fb917f6
commit
846351d9b2
@ -315,8 +315,13 @@ func (jm *JobManager) status() MsgJobStatus {
|
|||||||
tasksStatus[i] = TaskStatus{Status: "unknown", State: map[string]interface{}{"ExitCode": float64(-1)}}
|
tasksStatus[i] = TaskStatus{Status: "unknown", State: map[string]interface{}{"ExitCode": float64(-1)}}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if res.Code == 2 {
|
||||||
|
tasksStatus[i] = TaskStatus{Status: "unknown", State: map[string]interface{}{"ExitCode": float64(-2)}}
|
||||||
|
log.Warn(res.Error)
|
||||||
|
continue
|
||||||
|
}
|
||||||
if res.Code != 0 {
|
if res.Code != 0 {
|
||||||
tasksStatus[i] = TaskStatus{Status: "notexist", State: map[string]interface{}{"ExitCode": float64(1)}}
|
tasksStatus[i] = TaskStatus{Status: "notexist", State: map[string]interface{}{"ExitCode": float64(res.Code)}}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
res.Status.Node = taskStatus.Node
|
res.Status.Node = taskStatus.Node
|
||||||
|
@ -886,6 +886,7 @@ func (pool *ResourcePool) doAcquireResource(job Job) []NodeStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
allocation := InstanceOfAllocator().allocate(nodesT, tasks)
|
allocation := InstanceOfAllocator().allocate(nodesT, tasks)
|
||||||
|
log.Info(allocation, tasks)
|
||||||
if allocation.Flags["valid"] {
|
if allocation.Flags["valid"] {
|
||||||
|
|
||||||
for range job.Tasks { //append would cause uncertain order
|
for range job.Tasks { //append would cause uncertain order
|
||||||
|
Loading…
Reference in New Issue
Block a user