def create_run_task(run_id, inputs, output_directory=None): logger.info("Creating and validating Run for %s" % run_id) run = RunObject.from_cwl_definition(run_id, inputs) run.ready() RunObject.to_db(run) submit_job.delay(run_id, output_directory) logger.info("Run %s Ready" % run_id)
def create_run_task(run_id, inputs, output_directory=None): logger.info("Creating and validating Run") try: run = RunObject.from_cwl_definition(run_id, inputs) run.ready() except RunCreateException as e: run = RunObject.from_db(run_id) run.fail({'details': str(e)}) RunObject.to_db(run) logger.info("Run %s Failed" % run_id) else: RunObject.to_db(run) submit_job.delay(run_id, output_directory) logger.info("Run %s Ready" % run_id)