fix(tasks): properly limit jobs that can be fetched

This commit is contained in:
JoFrost
2026-09-30 18:38:12 +02:00
committed by GitHub
parent 19fa53b9ac
commit f75c35b07d
+1 -1
View File
@@ -558,7 +558,7 @@ impl QueueWorker {
// Compute how many jobs we should fetch at most
let max_jobs_to_fetch = MAX_CONCURRENT_JOBS
.saturating_sub(self.tracker.running_jobs())
.max(MAX_JOBS_TO_FETCH);
.min(MAX_JOBS_TO_FETCH);
if max_jobs_to_fetch == 0 {
tracing::warn!("Internal job queue is full, not fetching any new jobs");