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 792d3aa commit 4f777cbCopy full SHA for 4f777cb
django_celery_beat/schedulers.py
@@ -315,10 +315,8 @@ 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)
319
- valid_hours = [str(hour) for hour in range(24)] + [
320
- f"{hour:02d}" for hour in range(10)
321
- ]
+ # Create a list of all valid hour values (0-23), both padded and non-padded
+ valid_hours = [str(hour) if hour >= 10 else f"{hour:02d}" for hour in range(24)]
322
numeric_hour_tasks = CrontabSchedule.objects.filter(
323
hour__in=valid_hours
324
)
0 commit comments