We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f777cb commit 80d8306Copy full SHA for 80d8306
django_celery_beat/schedulers.py
@@ -315,8 +315,11 @@ def _get_crontab_exclude_query(self):
315
hours_to_include += [4] # celery's default cleanup task
316
317
# Get all tasks with a simple numeric hour value
318
- # Create a list of all valid hour values (0-23), both padded and non-padded
319
- valid_hours = [str(hour) if hour >= 10 else f"{hour:02d}" for hour in range(24)]
+ # Create a list of all valid hour values (0-23)
+ # both padded and non-padded
320
+ valid_hours = [str(hour) for hour in range(24)] + [
321
+ f"{hour:02d}" for hour in range(10)
322
+ ]
323
numeric_hour_tasks = CrontabSchedule.objects.filter(
324
hour__in=valid_hours
325
)
0 commit comments