Fix starter limits
This commit is contained in:
parent
d1e23fe551
commit
c2b2d88f4c
1 changed files with 2 additions and 2 deletions
|
|
@ -83,8 +83,8 @@ class Controller:
|
||||||
while True:
|
while True:
|
||||||
await self._wakeup_event.wait()
|
await self._wakeup_event.wait()
|
||||||
while True:
|
while True:
|
||||||
can_start = max(
|
can_start = min(
|
||||||
self.max_running - self.running,
|
self.max_running - self.running + 1,
|
||||||
self.max_starting - self.starting,
|
self.max_starting - self.starting,
|
||||||
)
|
)
|
||||||
if can_start <= 0:
|
if can_start <= 0:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue