-
these files are shared to faciliate troubleshooting an issue described in the below link: https://stackoverflow.com/questions/45784824/worker-does-not-consume-tasks-after-celery-add-consumer-is-called
-
start workers
celery@high1woka
andcelery@default1woka
celery -A foo worker -l info -Q default -n default1woka -b amqp://guest@localhost:5672// -Ofair -c 2 --pool=eventlet
celery -A foo worker -l info -Q high -n high1woka -b amqp://guest@localhost:5672// -Ofair -c 1 --pool=solo
-
monitor celery and rabbitmq
flower -A foo --port=5555 --broker=amqp://guest@localhost:5672//
-
python dostuff.py
- produces tasks to queuesdefault
andhigh
-
python cancel.py
- cancels consumption of tasks from queuehigh
for workercelery@high1woka
-
check that
celery@high1woka
logged that consumption from queuehigh
is stopped. -
python dostuff.py
- produces tasks to queuesdefault
andhigh
-
python resume.py
- request workercelery@high1woka
to resume consumption of tasks from qeueuehigh
. -
ISSUE occurs here.
celery@high1woka
is not consuming tasks from queuehigh
. -
if worker
celery@high1woka
is restarted, worker starts to consume tasks
Note: for windows OS in \Lib\site-packages\billiard\py3\connection.py, update line 32 to "except AttributeError:".
--
- updating celery : pip install celery==4.1.0
- updating billiard/spawn.py : encasulate line 338 to 339 with
try: except: pass
- (optional) install eventlet: pip install eventlet==0.22.1
- adding
--pool=eventlet
or--pool=solo
when starting workers per comment in celery/celery#4178
celery==4.2.1
billiard==3.5.0.5
kombu==4.2.1
eventlet==0.23.0
gevent==1.3.7
Scripts work with no change to installed libs using above set of lib/versions. However in production, while
flower
reflects actual state of workers, clicking worker name in flower does not return worker states (equivalent tocelery ... inspect active
) after some time.similar issue stated here: mher/flower#395