Ejemplo n.º 1
0
def cell_and_compute(instance, launched_at):
    usage_list = InstanceUsage.find(instance, launched_at)
    deployment = None
    usage = None
    if usage_list:
        usage = usage_list[0]
        deployment = usage.latest_deployment_for_request_id()
    cell = (deployment and deployment.name) or '-'
    compute = (usage and usage.host()) or '-'
    return cell, compute
Ejemplo n.º 2
0
def cell_and_compute(instance, launched_at):
    usage_list = InstanceUsage.find(instance, launched_at)
    deployment = None
    usage = None
    if usage_list:
        usage = usage_list[0]
        deployment = usage.latest_deployment_for_request_id()
    cell = (deployment and deployment.name) or '-'
    compute = (usage and usage.host()) or '-'
    return cell, compute
Ejemplo n.º 3
0
def cell_and_compute(instance, launched_at):
    usage = InstanceUsage.find(instance, launched_at)[0]
    deployment = usage.latest_deployment_for_request_id()
    cell = (deployment and deployment.name) or '-'
    compute = usage.host() or '-'
    return cell, compute