浏览代码

Inserting Exception that was accidentally removed

Jason Baker 15 年之前
父节点
当前提交
03bb80a226
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      celery/exceptions.py

+ 8 - 0
celery/exceptions.py

@@ -57,6 +57,14 @@ class MaxRetriesExceededError(Exception):
     pass
     pass
 
 
 
 
+class RetryTaskError(Exception):
+    """The task is to be retried later."""
+
+    def __init__(self, message, exc, *args, **kwargs):
+        self.exc = exc
+        Exception.__init__(self, message, exc, *args,
+                           **kwargs)
+
 class TaskRevokedError(Exception):
 class TaskRevokedError(Exception):
     """The task has been revoked, so no result available."""
     """The task has been revoked, so no result available."""
     pass
     pass