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
评论列表
文章目录