mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-11 00:10:56 +08:00
Update docs to add cluster option to the async_task (#157)
This commit is contained in:
+6
-1
@@ -75,6 +75,10 @@ broker
|
|||||||
""""""
|
""""""
|
||||||
A broker instance, in case you want to control your own connections.
|
A broker instance, in case you want to control your own connections.
|
||||||
|
|
||||||
|
cluster
|
||||||
|
""""""
|
||||||
|
The name of the cluster. Only useful if you are using [alternative queues](https://django-q2.readthedocs.io/en/master/cluster.html#multiple-queues).
|
||||||
|
|
||||||
task_name
|
task_name
|
||||||
"""""""""
|
"""""""""
|
||||||
|
|
||||||
@@ -241,7 +245,7 @@ Reference
|
|||||||
---------
|
---------
|
||||||
|
|
||||||
.. py:function:: async_task(func, *args, hook=None, group=None, timeout=None,\
|
.. py:function:: async_task(func, *args, hook=None, group=None, timeout=None,\
|
||||||
save=None, sync=False, cached=False, broker=None, q_options=None, **kwargs)
|
save=None, sync=False, cached=False, broker=None, cluster=None, q_options=None, **kwargs)
|
||||||
|
|
||||||
Puts a task in the cluster queue
|
Puts a task in the cluster queue
|
||||||
|
|
||||||
@@ -255,6 +259,7 @@ Reference
|
|||||||
:param bool sync: If set to True, async_task will simulate a task execution
|
:param bool sync: If set to True, async_task will simulate a task execution
|
||||||
:param cached: Output the result to the cache backend. Bool or timeout in seconds
|
:param cached: Output the result to the cache backend. Bool or timeout in seconds
|
||||||
:param broker: Optional broker connection from :func:`brokers.get_broker`
|
:param broker: Optional broker connection from :func:`brokers.get_broker`
|
||||||
|
:param cluster: Optional cluster name if using alternative queues
|
||||||
:param dict q_options: Options dict, overrides option keywords
|
:param dict q_options: Options dict, overrides option keywords
|
||||||
:param dict kwargs: Keyword arguments for the task function
|
:param dict kwargs: Keyword arguments for the task function
|
||||||
:returns: The uuid of the task
|
:returns: The uuid of the task
|
||||||
|
|||||||
Reference in New Issue
Block a user