Przeglądaj źródła

Adds Celery.on_configure callback

Ask Solem 11 lat temu
rodzic
commit
63f0d97cab
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      celery/app/base.py

+ 5 - 0
celery/app/base.py

@@ -395,7 +395,12 @@ class Celery(object):
             self.loader)
         return backend(app=self, url=url)
 
+    def on_configure(self):
+        """Callback calld when the app loads configuration"""
+        pass
+
     def _get_config(self):
+        self.on_configure()
         self.configured = True
         s = Settings({}, [self.prepare_config(self.loader.conf),
                           deepcopy(DEFAULTS)])