Browse Source

Adds celery.tasks for task registry to prepare for 3.0

Ask Solem 13 năm trước cách đây
mục cha
commit
06c64c0138
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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