__init__.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:capillary 作者: celery-capillary 项目源码 文件源码
def get_end_task(self, tasks, required_kwargs):
        """Accepts any number of tasks as returned by _get_pipeline.

        :param tasks: dictionary of str:info where str is the name of the task, info is from the registry
        :param dict required_kwargs: Keyword arguments that some tasks require

        :returns: celery.Signature, or celery.group, or None
        """

        sigs = [
            self.make_signature(info, required_kwargs)
            for name, info in tasks.items()
            if info['after'] is ALL
        ]

        if not sigs:
            return None

        return sigs[0] if len(sigs) == 1 else group(sigs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号