docs: group functions for task instances

updated group example to reflect easier syntax.
This commit is contained in:
Ilan Steemers
2015-09-16 17:01:23 +02:00
parent 061775b3bb
commit f7d30561a2
2 changed files with 31 additions and 4 deletions
+2 -2
View File
@@ -220,8 +220,8 @@ Adapted from `Sebastian Raschka's blog <http://sebastianraschka.com/Articles/201
# wait for 100 results to return and print it.
def parzen_hook(task):
if count_group('parzen') == 100:
print(result_group('parzen'))
if task.group_count() == 100:
print(task.group_result())
Django Q is not optimized for distributed computing, but this example will give you an idea of what you can do with task :ref:`groups`.