Explorar o código

Adds celery.tasks for task registry to prepare for 3.0

Ask Solem %!s(int64=13) %!d(string=hai) anos
pai
achega
06c64c0138
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      celery/app/base.py

+ 5 - 0
celery/app/base.py

@@ -385,3 +385,8 @@ class BaseApp(object):
     def log(self):
         """Logging utilities.  See :class:`~celery.log.Logging`."""
         return instantiate(self.log_cls, app=self)
+
+    @cached_property
+    def tasks(self):
+        from ..registry import tasks
+        return tasks