Explorar o código

Inserting Exception that was accidentally removed

Jason Baker %!s(int64=15) %!d(string=hai) anos
pai
achega
03bb80a226
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      celery/exceptions.py

+ 8 - 0
celery/exceptions.py

@@ -57,6 +57,14 @@ class MaxRetriesExceededError(Exception):
     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):
     """The task has been revoked, so no result available."""
     pass