mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-06 23:38:11 +08:00
Paste accidents happen
This commit is contained in:
+1
-1
@@ -359,7 +359,7 @@ def worker(task_queue, result_queue, timer, timeout=Conf.TIMEOUT):
|
|||||||
# Get the function from the task
|
# Get the function from the task
|
||||||
logger.info(_('{} processing [{}]').format(name, task['name']))
|
logger.info(_('{} processing [{}]').format(name, task['name']))
|
||||||
f = task['func']
|
f = task['func']
|
||||||
# if it's not an instance try to get it from the stringIncrement
|
# if it's not an instance try to get it from the string
|
||||||
if not callable(task['func']):
|
if not callable(task['func']):
|
||||||
try:
|
try:
|
||||||
module, func = f.rsplit('.', 1)
|
module, func = f.rsplit('.', 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user