feat: allow set max runners for nodes

This commit is contained in:
Marvin Zhang
2024-12-11 22:05:34 +08:00
parent 1f8f22e5cd
commit eaa834e8f8
3 changed files with 3 additions and 8 deletions

View File

@@ -85,8 +85,8 @@ func (svc *Service) fetchAndRunTasks() {
continue
}
// validate if there are available runners
if svc.getRunnerCount() >= n.MaxRunners {
// validate if max runners is reached (max runners = 0 means no limit)
if n.MaxRunners > 0 && svc.getRunnerCount() >= n.MaxRunners {
continue
}