Support for scheduling celery tasks. The worker is independent of salt and thus can run in a different virtualenv or on a different python version, as long as broker, backend and serializer configurations match. Also note that celery and packages required by the celery broker, e.g. redis must be installed to load the salt celery execution module.
Note
A new app (and thus new connections) is created for each task execution
salt.modules.celery.
run_task
(task_name, args=None, kwargs=None, broker=None, backend=None, wait_for_result=False, timeout=None, propagate=True, interval=0.5, no_ack=True, raise_timeout=True, config=None)¶Execute celery tasks. For celery specific parameters see celery documentation.
CLI Example:
salt '*' celery.run_task tasks.sleep args=[4] broker=redis://localhost \
backend=redis://localhost wait_for_result=true
The task name, e.g. tasks.sleep
Task arguments as a list
Task keyword arguments
Broker for celeryapp, see celery documentation
Result backend for celeryapp, see celery documentation
Wait until task result is read from result backend and return result, Default: False
Timeout waiting for result from celery, see celery AsyncResult.get documentation
Propagate exceptions from celery task, see celery AsyncResult.get documentation, Default: True
Interval to check for task result, see celery AsyncResult.get documentation, Default: 0.5
see celery AsyncResult.get documentation. Default: True
Raise timeout exception if waiting for task result times out. Default: False
Config dict for celery app, See celery documentation
Generated on June 18, 2020 at 04:09:58 UTC.
You are viewing docs for the latest stable release, 3001. Switch to docs for the previous stable release, 3000.3, or to a recent doc build from the master branch.
© 2020 SaltStack. All Rights Reserved, SaltStack Inc. | Privacy Policy