Reputation: 1208
Got stuck for a while using custom scheduler for celery beats:
celery -A myapp worker -S redbeat.RedBeatScheduler -E -B -l info
My though was that this would launch both celery worker
and celery beats
using the redbeat.RedBeatScheduler
as its scheduler. It even says beat: Staring..
, however it does not use the specified scheduler apparently. No cron tasks are executed like this.
However when I split this command into separate worker
and beats
, that means
celery -A myapp worker -E -l info
celery -A myapp beat -S redbeat.RedBeatScheduler
Everything works as expected.
Is there any way to merge those two commands?
Upvotes: 1
Views: 900
Reputation: 19797
I do not think the Celery worker has the -S
parameter like beat does. Here is what --helps says:
--scheduler SCHEDULER Scheduler class to use. Default is celery.beat.PersistentScheduler
So I suggest you use the --scheduler option and run celery -A myapp worker --scheduler redbeat.RedBeatScheduler -E -B -l info
instead.
Upvotes: 2