1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-15 08:16:43 +00:00

add scheduler_priority

This commit is contained in:
2019-07-12 14:58:16 +08:00
parent c42154696e
commit 3876c474e4
3 changed files with 257 additions and 1 deletions

View File

@@ -51,7 +51,6 @@ func (scheduler *SchedulerFCFS) Start() {
}
func (scheduler *SchedulerFCFS) UpdateProgress(jobName string, state State) {
scheduler.scheduling.Unlock()
switch state {
case Running:
scheduler.scheduling.Unlock()
@@ -69,6 +68,13 @@ func (scheduler *SchedulerFCFS) UpdateProgress(jobName string, state State) {
}
}
break
case Stopped:
for i := range scheduler.history {
if scheduler.history[i].Name == jobName {
scheduler.history[i].Status = Stopped
}
}
break
}
}