From fd1b57628f98c708979754f7910d1b134abc20f5 Mon Sep 17 00:00:00 2001 From: Matvey Kukuy Date: Wed, 11 Sep 2024 15:04:01 +0800 Subject: [PATCH] Lint --- arq/worker.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arq/worker.py b/arq/worker.py index 545ccf1c..4bba4d61 100644 --- a/arq/worker.py +++ b/arq/worker.py @@ -751,8 +751,12 @@ async def run_cron(self, n: datetime, delay: float, num_windows: int = 2) -> Non job_id = f'{cron_job.name}:{to_unix_ms(cron_job.next_run)}' if cron_job.unique else None job_futures.add( self.pool.enqueue_job( - cron_job.name, _job_id=job_id, _queue_name=self.queue_name, - _defer_until=(cron_job.next_run if cron_job.next_run > datetime.now(tz=self.timezone) else None), + cron_job.name, + _job_id=job_id, + _queue_name=self.queue_name, + _defer_until=( + cron_job.next_run if cron_job.next_run > datetime.now(tz=self.timezone) else None + ), ) ) cron_job.calculate_next(cron_job.next_run)