Skip to content

Commit f5b674b

Browse files
committed
Use total_seconds over .seconds
1 parent 8555f5d commit f5b674b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_dbq/management/commands/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(self, name, rate_limit_in_seconds):
6767

6868
def do_work(self):
6969
sleep(1)
70-
if self.last_job_finished and (timezone.now() - self.last_job_finished).seconds < self.rate_limit_in_seconds:
70+
if self.last_job_finished and (timezone.now() - self.last_job_finished).total_seconds() < self.rate_limit_in_seconds:
7171
return
7272

7373
process_job(self.queue_name)

0 commit comments

Comments
 (0)