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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user