@@ -109,7 +109,7 @@ def ListRuns(self, page_size=None, page_token=None, state_search=None):
109109 }
110110
111111 def invoke_cwl_runner (self , cr_uuid , workflow_url , workflow_params ,
112- env , workflow_descriptor_file , project_uuid ,
112+ env , workflow_attachment_file , project_uuid ,
113113 tempdir ):
114114 api = arvados .api_from_config (version = "v1" , apiconfig = {
115115 "ARVADOS_API_HOST" : env ["ARVADOS_API_HOST" ],
@@ -151,8 +151,8 @@ def invoke_cwl_runner(self, cr_uuid, workflow_url, workflow_params,
151151 api .container_requests ().update (uuid = cr_uuid , body = {"priority" : 0 ,
152152 "properties" : {"arvados-cwl-runner-log" : str (e )}}).execute ()
153153 finally :
154- if workflow_descriptor_file is not None :
155- workflow_descriptor_file .close ()
154+ if workflow_attachment_file is not None :
155+ workflow_attachment_file .close ()
156156
157157 @catch_exceptions
158158 def RunWorkflow (self , ** args ):
@@ -184,20 +184,20 @@ def RunWorkflow(self, **args):
184184 "priority" : 500 }}).execute ()
185185
186186 workflow_url = body .get ("workflow_url" )
187- workflow_descriptor_file = None
188- if body .get ("workflow_descriptor " ):
189- workflow_descriptor_file = tempfile .NamedTemporaryFile ()
190- workflow_descriptor_file .write (body .get ('workflow_descriptor ' ))
191- workflow_descriptor_file .flush ()
192- workflow_url = workflow_descriptor_file .name
187+ workflow_attachment_file = None
188+ if body .get ("workflow_attachment " ):
189+ workflow_attachment_file = tempfile .NamedTemporaryFile ()
190+ workflow_attachment_file .write (body .get ('workflow_attachment ' ))
191+ workflow_attachment_file .flush ()
192+ workflow_url = workflow_attachment_file .name
193193
194194 project_uuid = body .get ("workflow_engine_parameters" , {}).get ("project_uuid" )
195195
196196 threading .Thread (target = self .invoke_cwl_runner , args = (cr ["uuid" ],
197197 workflow_url ,
198198 body ["workflow_params" ],
199199 env ,
200- workflow_descriptor_file ,
200+ workflow_attachment_file ,
201201 project_uuid ,
202202 tempdir )).start ()
203203
0 commit comments