示例#1
0
 def get_application(self, job_id, application_name):
     try:
         return models.Application(
             job_submit_helper.get_application(self, job_id,
                                               application_name))
     except batch_error.BatchErrorException as e:
         raise error.AztkError(helpers.format_batch_exception(e))
示例#2
0
def list_applications(core_job_operations, job_id):
    try:
        applications = _list_applications(core_job_operations, job_id)
        for item in applications:
            if applications[item]:
                applications[item] = models.Application(applications[item])
        return applications
    except batch_error.BatchErrorException as e:
        raise error.AztkError(helpers.format_batch_exception(e))
def _list_applications(core_operations, id):
    # info about the app
    scheduling_target = core_operations.get_cluster_configuration(
        id).scheduling_target
    if scheduling_target is not models.SchedulingTarget.Any:
        return models.Application(core_operations.list_applications(id))

    recent_run_job = core_operations.get_recent_job(id)
    return core_operations.list_batch_tasks(id=recent_run_job.id)
示例#4
0
 def list_applications(self, job_id):
     try:
         applications = job_submit_helper.list_applications(self, job_id)
         for item in applications:
             if applications[item]:
                 applications[item] = models.Application(applications[item])
         return applications
     except batch_error.BatchErrorException as e:
         raise error.AztkError(helpers.format_batch_exception(e))
def list_applications(core_operations, id):
    try:
        return models.Application(_list_applications(core_operations, id))
    except BatchErrorException as e:
        raise error.AztkError(helpers.format_batch_exception(e))
示例#6
0
def get_application(core_operations, job_id, application_name):
    try:
        return models.Application(
            _get_application(core_operations, job_id, application_name))
    except BatchErrorException as e:
        raise error.AztkError(helpers.format_batch_exception(e))