Skip to content

Commit

Permalink
update:
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Feb 6, 2023
1 parent 5b80f25 commit 51e3813
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions resourcemanager/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@ func (r *ResourceManager) schedule() {
}

func (r *ResourceManager) schedulePool(pool *util.PoolContainer) scheduler.Command {
if pool.Pool.Running() != 0 {
for _, sch := range r.scheduler {
cmd := sch.Tune(pool.Component, pool.Pool)
switch cmd {
case scheduler.Hold:
continue
default:
return cmd
}
if pool.Pool.Running() == 0 {
return scheduler.Hold
}
for _, sch := range r.scheduler {
cmd := sch.Tune(pool.Component, pool.Pool)
switch cmd {
case scheduler.Hold:
continue
default:
return cmd
}
}
return scheduler.Hold
Expand Down

0 comments on commit 51e3813

Please sign in to comment.