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 celery_app.py 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
>>> app.control.ping()

See all notes.

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