Open
Description
Issue Description
One-off tasks in django-celery-beat
are executed multiple times if Celery Beat is restarted shortly after the task runs.
Steps to Reproduce
- Create a one-off task (
one_off=True
) scheduled to run at a specific time. - Start Celery and Celery Beat, wait for the task to execute.
- Verify the task has run.
- Restart Celery Beat within 10 seconds after the task’s execution.
- Observe that the task runs again after the restart.
Expected Behavior
- One-off tasks should only execute once, even if Celery Beat is restarted shortly after their execution.
Actual Behavior
- The one-off task is executed again if Celery Beat is restarted within a short time after its initial execution. However, if several minutes pass before restarting, the task does not run again.
Versions
celery==5.4.0
django-celery-beat==2.7.0
Metadata
Metadata
Assignees
Labels
No labels