From f75c35b07defe9358c3ce4258c7fcf657136176c Mon Sep 17 00:00:00 2001 From: JoFrost <20685007+JoFrost@users.noreply.github.com> Date: Wed, 30 Sep 2026 18:38:12 +0200 Subject: [PATCH] fix(tasks): properly limit jobs that can be fetched --- crates/tasks/src/new_queue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tasks/src/new_queue.rs b/crates/tasks/src/new_queue.rs index e7f3a9a99..dfeee6b97 100644 --- a/crates/tasks/src/new_queue.rs +++ b/crates/tasks/src/new_queue.rs @@ -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");