From 6265a54008c70fdc56a04cde6c5729801e385374 Mon Sep 17 00:00:00 2001 From: Stan Triepels <1939656+GDay@users.noreply.github.com> Date: Sun, 18 Feb 2024 04:00:07 +0100 Subject: [PATCH] Update docs to add cluster option to the async_task (#157) --- docs/tasks.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/tasks.rst b/docs/tasks.rst index 7365ff8..7fe01db 100644 --- a/docs/tasks.rst +++ b/docs/tasks.rst @@ -75,6 +75,10 @@ broker """""" 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 """"""""" @@ -241,7 +245,7 @@ Reference --------- .. 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 @@ -255,6 +259,7 @@ Reference :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 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 kwargs: Keyword arguments for the task function :returns: The uuid of the task