ecs.py 文件源码

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

项目:deployfish 作者: caltechads 项目源码 文件源码
def get_helper_tasks(self):
        """
        Return a information about our helper tasks for this task definition.
        This is in the form of a dictionary like so:

            {`<helper_task_family>`: `<helper_task_family>:<revision>`, ...}

        If our service has helper tasks (as defined in the `tasks:` section of
        the deployfish.yml file), we've recorded the appropriate
        `<family>:<revision>` of each them as docker labels in the container
        definition of the first container in the task definition.

        Those docker labels will be in this form:

            edu.caltech.tasks.<task name>.id=<family>:<revision>

        :rtype: dict of strings
        """
        l = {}
        for key, value in self.dockerLabels.items():
            if key.startswith('edu.caltech.task'):
                l[value.split(':')[0]] = value
        return l
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号