I have created a celery worker with a single celerybeat schedule task which runs at 5 seconds time interval. How can I add another beat task dynamically to the celery worker without stopping it?
Example
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_TIMEZONE = 'UTC',
CELERYBEAT_SCHEDULE = {
'long-run-5-secs': {
'task': 'test_proj.tasks.test',
'schedule': timedelta(seconds=5),
'args': (16, )
}
}
)
Run Code Online (Sandbox Code Playgroud)
With the above configuration, I am able to run the celery worker with beat mode successfully.
Now I need add the below beat schedule dynamically: …