瀏覽代碼

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

Ask Solem 16 年之前
父節點
當前提交
a4725a1e6a
共有 1 個文件被更改,包括 2 次插入0 次删除
  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))