mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
updated worker logic
This commit is contained in:
1 parent
eb2141c5af
commit
553c2a1707
2 files changed
+18
-17
No files matched your search
@@ -23,7 +23,7 @@ class Command(BaseCommand):
|
||||
# or those where next_run has passed.
|
||||
now = timezone.now()
|
||||
jobs_to_run = Job.objects.filter(
|
||||
status__in=['pending', 'failed']
|
||||
~models.Q(status='running')
|
||||
).filter(
|
||||
# Run if pending OR (next_run is set AND has passed)
|
||||
models.Q(status='pending') |
|
||||
|
||||
Reference in new issue
Block a user