From f7d30561a27759cec3b14afe07deea50c91a97eb Mon Sep 17 00:00:00 2001 From: Ilan Steemers Date: Wed, 16 Sep 2015 17:01:23 +0200 Subject: [PATCH] docs: group functions for task instances updated group example to reflect easier syntax. --- docs/examples.rst | 4 ++-- docs/tasks.rst | 31 +++++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/docs/examples.rst b/docs/examples.rst index 4b9038d..9783d73 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -220,8 +220,8 @@ Adapted from `Sebastian Raschka's blog 100: + print(task.group_result()) + task.group_delete() + print('Deleted group {}'.format(task.group)) Synchronous testing ------------------- @@ -318,6 +330,21 @@ Reference Time taken represents the time a task spends in the cluster, this includes any time it may have waited in the queue. + .. py:method:: group_result(failures=False) + + Returns a list of results from this task's group. + Set failures to ``True`` to include failed results. + + .. py:method:: group_count(failures=False) + + Returns a count of the number of task results in this task's group. + Returns the number of failures when ``failures=True`` + + .. py:method:: group_delete(tasks=False) + + Resets the group label on all the tasks in this task's group. + If ``tasks=True`` it will also delete the tasks in this group from the database, including itself. + .. py:classmethod:: get_result(task_id) Gets a result directly by task uuid or name.