فهرست منبع

Moving this to celery.exceptions so you can import the error for inspection without raising it.

Jason Baker 15 سال پیش
والد
کامیت
dc32dcf87d
2فایلهای تغییر یافته به همراه6 افزوده شده و 11 حذف شده
  1. 5 8
      celery/exceptions.py
  2. 1 3
      celery/loaders/default.py

+ 5 - 8
celery/exceptions.py

@@ -57,14 +57,11 @@ 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
+
+
+class NotConfigured(UserWarning):
+    """Celery has not been configured, as no config module has been found."""
+

+ 1 - 3
celery/loaders/default.py

@@ -4,6 +4,7 @@ import warnings
 from importlib import import_module
 
 from celery.loaders.base import BaseLoader
+from celery.exceptions import NotConfigured
 
 DEFAULT_CONFIG_MODULE = "celeryconfig"
 
@@ -22,9 +23,6 @@ DEFAULT_UNCONFIGURED_SETTINGS = {
 }
 
 
-class NotConfigured(UserWarning):
-    """Celery has not been configured, as no config module has been found."""
-
 
 def wanted_module_item(item):
     return not item.startswith("_")