Skip to content

Commit

Permalink
correcting condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
HK-Mattew authored Aug 1, 2024
1 parent 66659d3 commit 975e148
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/apscheduler/datastores/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,11 +686,7 @@ async def acquire_jobs(
continue

# Skip and un-acquire the job if no more slots are available
task_slots_left = task_job_slots_left.get(job.task_id, float("inf"))
if (
not task_slots_left
or running_job_count_increments[job.task_id] == task_slots_left
):
if not task_job_slots_left.get(job.task_id, float("inf")):
self._logger.debug(
"Skipping job %s because task %r has the maximum "
"number of %d jobs already running",
Expand Down

0 comments on commit 975e148

Please sign in to comment.