|
@@ -21,7 +21,7 @@ from kombu.utils import cached_property
|
|
|
from celery import current_app
|
|
|
from celery import states
|
|
|
from celery.__compat__ import class_property
|
|
|
-from celery.state import get_current_task, _task_stack
|
|
|
+from celery.state import get_current_worker_task, _task_stack
|
|
|
from celery.datastructures import ExceptionInfo
|
|
|
from celery.exceptions import MaxRetriesExceededError, RetryTaskError
|
|
|
from celery.result import EagerResult
|
|
@@ -581,7 +581,7 @@ class BaseTask(object):
|
|
|
publish.release()
|
|
|
|
|
|
result = self.AsyncResult(task_id)
|
|
|
- parent = get_current_task()
|
|
|
+ parent = get_current_worker_task()
|
|
|
if parent:
|
|
|
parent.request.children.append(result)
|
|
|
return result
|