@@ -109,7 +109,7 @@ def ListRuns(self, page_size=None, page_token=None, state_search=None):
109
109
}
110
110
111
111
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 ,
113
113
tempdir ):
114
114
api = arvados .api_from_config (version = "v1" , apiconfig = {
115
115
"ARVADOS_API_HOST" : env ["ARVADOS_API_HOST" ],
@@ -151,8 +151,8 @@ def invoke_cwl_runner(self, cr_uuid, workflow_url, workflow_params,
151
151
api .container_requests ().update (uuid = cr_uuid , body = {"priority" : 0 ,
152
152
"properties" : {"arvados-cwl-runner-log" : str (e )}}).execute ()
153
153
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 ()
156
156
157
157
@catch_exceptions
158
158
def RunWorkflow (self , ** args ):
@@ -184,20 +184,20 @@ def RunWorkflow(self, **args):
184
184
"priority" : 500 }}).execute ()
185
185
186
186
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
193
193
194
194
project_uuid = body .get ("workflow_engine_parameters" , {}).get ("project_uuid" )
195
195
196
196
threading .Thread (target = self .invoke_cwl_runner , args = (cr ["uuid" ],
197
197
workflow_url ,
198
198
body ["workflow_params" ],
199
199
env ,
200
- workflow_descriptor_file ,
200
+ workflow_attachment_file ,
201
201
project_uuid ,
202
202
tempdir )).start ()
203
203
0 commit comments