Explorar o código

wait_for() now reraises the exception if status is FAILURE.

Ask Solem %!s(int64=16) %!d(string=hai) anos
pai
achega
a4725a1e6a
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      celery/backends/base.py

+ 2 - 0
celery/backends/base.py

@@ -50,6 +50,8 @@ class BaseBackend(object):
             status = self.get_status(task_id)
             if status == "DONE":
                 return self.get_result(task_id)
+            elif status == "FAILURE":
+                raise self.get_result(task_id)
             if timeout and time.time() > time_start + timeout:
                 raise self.TimeOutError(
                         "Timed out while waiting for task %s" % (task_id))