mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-08 23:48:12 +08:00
Adds wait option to result() and fetch()
This commit is contained in:
+4
-1
@@ -127,7 +127,10 @@ Use `async` from your code to quickly offload tasks:
|
||||
task_result = result(task_id)
|
||||
|
||||
# result returns None if the task has not been executed yet
|
||||
# so in most cases you will want to use a hook:
|
||||
# you can wait for it
|
||||
task_result = result(task_id, 200)
|
||||
|
||||
# but in most cases you will want to use a hook:
|
||||
|
||||
async('math.modf', 2.5, hook='hooks.print_result')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user