You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original problem:
I have two different django projects say projA and projB, each have its own celery daemon running on separate queues but same vhost, projA have a task taskA and projB have a task taskB, I try to run taskB from inside taskA e.g.
@task(routing_key='taskA')
def taskA(event_id):
# do some work , then call taskB and wait for result
result = send_task('taskB',routing_key='taskB')
res = result.get(timeout=20)
I can see in logs of projB that taskB finished within a second, but taskA keeps on waiting for result and times out after 20 seconds
For backend I have rabbitmq.
Solution:
Setting the result back-end fixes the problem
Are you not using 2.3? This is the expected behaviour there:
>>> add.delay(2, 2).get()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/devel/celery/celery/result.py", line 83, in get
interval=interval)
File "/opt/devel/celery/celery/backends/base.py", line 369, in _is_disabled
raise NotImplementedError("No result backend configured. "
NotImplementedError: No result backend configured. Please see the documentation for more information.
Original problem:
I have two different django projects say
projA
andprojB
, each have its own celery daemon running on separate queues but same vhost, projA have a tasktaskA
and projB have a tasktaskB
, I try to runtaskB
from insidetaskA
e.g.I can see in logs of projB that taskB finished within a second, but taskA keeps on waiting for result and times out after 20 seconds
For backend I have rabbitmq.
Solution:
Setting the result back-end fixes the problem
IMO if result back-end is not set result.get should throw error or at-least log a warning
The text was updated successfully, but these errors were encountered: