Commit 6b1d8764 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

README: explain celeryconfig, signatures and state synchronization

parent db2e4c2bcba7
......@@ -31,6 +31,11 @@ Start a worker::
celery worker -l info -E
Ensure to have the celeryconfig.py loaded for both cubicweb instance and
celery worker, enforce by settings with CELERY_CONFIG_MODULE environment
variable (it must be an importable python module).
Create a task:
.. code-block:: python
......@@ -53,3 +58,13 @@ Run a task:
from cubes.celerytask.entities import start_async_task
cwtask = start_async_task(cnx, 'hi_there', 'THERE', kw=42)
cnx.commit()
start_async_task() accept task names, task objects or task signatures:
http://docs.celeryproject.org/en/latest/userguide/canvas.html#signatures
Task state synchronization require to run the `celery-monitor` command::
cubicweb-ctl celery-monitor <instance-name>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment