def run_cwl_workflow_engine_adapter( publisher, rjc_api_client, workflow_uuid=None, workflow_workspace=None, workflow_json=None, workflow_parameters=None, operational_options={}, **kwargs, ): """Run cwl workflow.""" workflow_parameters = parse_str_to_int(workflow_parameters) log.info(f"running workflow on context: {locals()}") rcode = main.main( publisher, rjc_api_client, workflow_uuid, workflow_json, workflow_parameters, operational_options, workflow_workspace, ) log.info("workflow done") publisher.publish_workflow_status(workflow_uuid, rcode_to_workflow_status(rcode))
def run_cwl_workflow(workflow_uuid, workflow_workspace, workflow_json=None, workflow_parameters=None, operational_options={}): """Run cwl workflow.""" workflow_parameters = parse_str_to_int(workflow_parameters) log.info(f'running workflow on context: {locals()}') try: check_connection_to_job_controller() publisher = WorkflowStatusPublisher() rcode = main.main(workflow_uuid, workflow_json, workflow_parameters, operational_options, workflow_workspace, publisher) log.info('workflow done') publisher.publish_workflow_status(workflow_uuid, rcode_to_workflow_status(rcode)) except Exception as e: log.error(f'workflow failed: {e}') publisher.publish_workflow_status(workflow_uuid, 3, message=str(e)) finally: if publisher: publisher.close() else: log.error(f'Workflow {workflow_uuid} failed but status ' 'could not be published.')
def run_cwl_workflow(workflow_uuid, workflow_workspace, workflow_json=None, workflow_parameters=None, operational_options={}): """Run cwl workflow.""" log.info('running workflow on context: {0}'.format(locals())) try: publisher = WorkflowStatusPublisher() main.main(workflow_uuid, workflow_json, workflow_parameters, operational_options, workflow_workspace, publisher) log.info('workflow done') publisher.publish_workflow_status(workflow_uuid, 2) except Exception as e: log.error('workflow failed: {0}'.format(e)) publisher.publish_workflow_status(workflow_uuid, 3, message=str(e)) finally: if publisher: publisher.close() else: log.error( 'Workflow {workflow_uuid} failed but status ' 'could not be published.'.format(workflow_uuid=workflow_uuid))