def submit_jobs(job_specs):
    """Submit a job

    Args:
        job_spec (dict): The job specifiation (see Grid'5000 API reference)
    """
    gk = get_api_client()
    jobs = []
    try:
        for site, job_spec in job_specs:
            logger.info("Submitting %s on %s" % (job_spec, site))
            jobs.append(gk.sites[site].jobs.create(job_spec))
    except Exception as e:
        logger.error("An error occured during the job submissions")
        logger.error("Cleaning the jobs created")
        for job in jobs:
            job.delete()
        raise(e)

    return jobs
def submit_jobs ( job_specs ) : gk = get_api_client ( ) jobs = [ ] try : for site , job_spec in job_specs : logger . info ( "Submitting %s on %s" % ( job_spec , site ) ) jobs . append ( gk . sites [ site ] . jobs . create ( job_spec ) ) except Exception as e : logger . error ( "An error occured during the job submissions" ) logger . error ( "Cleaning the jobs created" ) for job in jobs : job . delete ( ) raise ( e ) return jobs
Submit a job

    Args:
        job_spec (dict): The job specifiation (see Grid'5000 API reference)