浏览代码

Adds 'group' as an alias to TaskSet

Ask Solem 13 年之前
父节点
当前提交
d7a4c1eca7
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 4 4
      celery/task/__init__.py
  2. 1 0
      celery/task/sets.py

+ 4 - 4
celery/task/__init__.py

@@ -16,10 +16,10 @@ import warnings
 from ..app import app_or_default
 from ..exceptions import CDeprecationWarning
 
-from .base import Task, PeriodicTask  # noqa
-from .sets import TaskSet, subtask    # noqa
-from .chords import chord             # noqa
-from .control import discard_all      # noqa
+from .base import Task, PeriodicTask        # noqa
+from .sets import group, TaskSet, subtask   # noqa
+from .chords import chord                   # noqa
+from .control import discard_all            # noqa
 
 
 def task(*args, **kwargs):

+ 1 - 0
celery/task/sets.py

@@ -209,3 +209,4 @@ class TaskSet(UserList):
             "TaskSet.task_name is deprecated and will be removed in 1.4",
             CDeprecationWarning)
         return self._task_name
+group = TaskSet