from sandbox.common.types.task import Priority


def build(cl, version):
    _id = cl.task({
        'type': 'ASSEMBLE_OOPS_AGENT',
        'owner': 'OOPS',
        'kill_timeout': 10800,
        'do_not_remove_resources': False,
        'context': {
            'service_version': version,
        },
        'priority': (Priority.Class.SERVICE, Priority.Subclass.HIGH),
        'description': 'oops-agent-%s' % (version,),
    })['id']
    return _id
