mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-22 01:48:11 +08:00
Adds optional task_name argument
Makes it possible to name the task yourself.
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ def async(func, *args, **kwargs):
|
||||
tag = uuid()
|
||||
# build the task package
|
||||
task = {'id': tag[1],
|
||||
'name': tag[0],
|
||||
'name': q_options.pop('task_name', None) or tag[0],
|
||||
'func': func,
|
||||
'args': args}
|
||||
# push optionals
|
||||
|
||||
@@ -69,6 +69,11 @@ broker
|
||||
""""""
|
||||
A broker instance, in case you want to control your own connections.
|
||||
|
||||
task_name
|
||||
"""""""""
|
||||
|
||||
Optionally overwrites the auto-generated task name.
|
||||
|
||||
q_options
|
||||
"""""""""
|
||||
None of the option keywords get passed on to the task function.
|
||||
|
||||
Reference in New Issue
Block a user