From 4a33ff46d7a0483601ae422eed762eaaf8511b0d Mon Sep 17 00:00:00 2001 From: sabersolooki Date: Wed, 14 May 2025 16:06:11 +0200 Subject: [PATCH] Fix(stream): read based on allowed to take jobs --- arq/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arq/worker.py b/arq/worker.py index b014a58b..35dbf1db 100644 --- a/arq/worker.py +++ b/arq/worker.py @@ -414,7 +414,7 @@ async def _read_stream_iteration(self) -> None: Get ids of pending jobs from the stream and start those jobs, remove any finished tasks from self.tasks. """ - count = self.max_jobs + count = self.max_jobs - self.job_counter if self.burst and self.max_burst_jobs >= 0: burst_jobs_remaining = self.max_burst_jobs - self._jobs_started() if burst_jobs_remaining < 1: