Skip to content

Commit

Permalink
fix(runner): detect runner without running tasks correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4D616E75 authored and supercomputer7 committed Oct 18, 2024
1 parent 355265f commit f48d188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/tasks/RemoteJob.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (t *RemoteJob) Run(username string, incomingVersion *string) (err error) {

for _, r := range runners {
n := t.taskPool.GetNumberOfRunningTasksOfRunner(r.ID)
if n > 0 && n < r.MaxParallelTasks {
if n < r.MaxParallelTasks || r.MaxParallelTasks == 0 {
runner = &r
break
}
Expand Down

0 comments on commit f48d188

Please sign in to comment.