1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-12 23:36:44 +00:00

fix some concurrent problems

This commit is contained in:
2020-04-13 20:29:58 +08:00
parent 83b9a7faae
commit 490ce3f26a
3 changed files with 27 additions and 14 deletions

View File

@@ -23,6 +23,7 @@ type SchedulerFair struct {
nextQueue string
resourceAllocations map[string]*ResourceCount
enabled bool
latestPoolIndex int
}
type FairJobSorter []Job
@@ -71,6 +72,7 @@ func (scheduler *SchedulerFair) Start() {
jm.start()
}()
} else {
log.Info("No more jobs to scheduling")
scheduler.scheduling.Unlock()
go func() {
scheduler.UpdateNextQueue()