Sam Hooke

Manually invoking Celery app control commands from a Python package

Given a Python package named my_package installed in the virtual environment /opt/venv/, and which contains a top level file which defines the Celery app object, this is how you can manually invoke Celery commands (e.g. to perform a ping):

$ source /opt/venv/bin/activate
(venv) $ python
>>> from my_package.celery_app import app

These are rough notes from whatever I was working on, interested in or thinking about at the time. They vary greatly in quality and length, but prove useful to me, and hopefully to you too!

← Previous: Debugging RabbitMQ
Next: Kombu "timed out" bug: connection hangs forever in Kombu 4.1.0 →