Execute celery tasks. For celery specific parameters see celery documentation. CLI Example: .. code-block:: bash salt '*' celery.run_task tasks.sleep args=[4] broker=redis://localhost \\ backend=redis://localhost wait_for_result=true task_name The task na
(
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,
)
| 34 | |
| 35 | |
| 36 | def run_task( |
| 37 | task_name, |
| 38 | args=None, |
| 39 | kwargs=None, |
| 40 | broker=None, |
| 41 | backend=None, |
| 42 | wait_for_result=False, |
| 43 | timeout=None, |
| 44 | propagate=True, |
| 45 | interval=0.5, |
| 46 | no_ack=True, |
| 47 | raise_timeout=True, |
| 48 | config=None, |
| 49 | ): |
| 50 | """ |
| 51 | Execute celery tasks. For celery specific parameters see celery documentation. |
| 52 | |
| 53 | CLI Example: |
| 54 | |
| 55 | .. code-block:: bash |
| 56 | |
| 57 | salt '*' celery.run_task tasks.sleep args=[4] broker=redis://localhost \\ |
| 58 | backend=redis://localhost wait_for_result=true |
| 59 | |
| 60 | task_name |
| 61 | The task name, e.g. tasks.sleep |
| 62 | |
| 63 | args |
| 64 | Task arguments as a list |
| 65 | |
| 66 | kwargs |
| 67 | Task keyword arguments |
| 68 | |
| 69 | broker |
| 70 | Broker for celeryapp, see celery documentation |
| 71 | |
| 72 | backend |
| 73 | Result backend for celeryapp, see celery documentation |
| 74 | |
| 75 | wait_for_result |
| 76 | Wait until task result is read from result backend and return result, Default: False |
| 77 | |
| 78 | timeout |
| 79 | Timeout waiting for result from celery, see celery AsyncResult.get documentation |
| 80 | |
| 81 | propagate |
| 82 | Propagate exceptions from celery task, see celery AsyncResult.get documentation, Default: True |
| 83 | |
| 84 | interval |
| 85 | Interval to check for task result, see celery AsyncResult.get documentation, Default: 0.5 |
| 86 | |
| 87 | no_ack |
| 88 | see celery AsyncResult.get documentation. Default: True |
| 89 | |
| 90 | raise_timeout |
| 91 | Raise timeout exception if waiting for task result times out. Default: False |
| 92 | |
| 93 | config |
nothing calls this directly
no test coverage detected