@@ -81,7 +81,7 @@ def GetServiceInfo(self):
81
81
}
82
82
83
83
@catch_exceptions
84
- def ListWorkflows (self , page_size = None , page_token = None , tag_search = None , state_search = None ):
84
+ def ListRuns (self , page_size = None , page_token = None , state_search = None ):
85
85
api = get_api ()
86
86
87
87
paging = []
@@ -100,13 +100,13 @@ def ListWorkflows(self, page_size=None, page_token=None, tag_search=None, state_
100
100
101
101
uuidmap = {c ["uuid" ]: statemap [c ["state" ]] for c in containers }
102
102
103
- workflow_list = [{"workflow_id " : cr ["uuid" ],
103
+ workflow_list = [{"run_id " : cr ["uuid" ],
104
104
"state" : uuidmap .get (cr ["container_uuid" ])}
105
105
for cr in requests
106
106
if cr ["command" ] and cr ["command" ][0 ] == "arvados-cwl-runner" ]
107
107
return {
108
108
"workflows" : workflow_list ,
109
- "next_page_token" : workflow_list [- 1 ]["workflow_id " ] if workflow_list else ""
109
+ "next_page_token" : workflow_list [- 1 ]["run_id " ] if workflow_list else ""
110
110
}
111
111
112
112
def invoke_cwl_runner (self , cr_uuid , workflow_url , workflow_params ,
@@ -215,13 +215,13 @@ def RunWorkflow(self, workflow_params, workflow_type, workflow_type_version,
215
215
project_uuid ,
216
216
tempdir )).start ()
217
217
218
- return {"workflow_id " : cr ["uuid" ]}
218
+ return {"run_id " : cr ["uuid" ]}
219
219
220
220
@catch_exceptions
221
- def GetWorkflowLog (self , workflow_id ):
221
+ def GetRunLog (self , run_id ):
222
222
api = get_api ()
223
223
224
- request = api .container_requests ().get (uuid = workflow_id ).execute ()
224
+ request = api .container_requests ().get (uuid = run_id ).execute ()
225
225
if request ["container_uuid" ]:
226
226
container = api .containers ().get (uuid = request ["container_uuid" ]).execute () # NOQA
227
227
task_reqs = arvados .util .list_all (api .container_requests ().list , filters = [["requesting_container_uuid" , "=" , container ["uuid" ]]])
@@ -273,7 +273,7 @@ def log_object(cr):
273
273
return r
274
274
275
275
r = {
276
- "workflow_id " : request ["uuid" ],
276
+ "run_id " : request ["uuid" ],
277
277
"request" : {
278
278
"workflow_url" : "" ,
279
279
"workflow_params" : request ["mounts" ].get ("/var/lib/cwl/cwl.input.json" , {}).get ("content" , {})
@@ -287,30 +287,30 @@ def log_object(cr):
287
287
return r
288
288
289
289
@catch_exceptions
290
- def CancelJob (self , workflow_id ): # NOQA
290
+ def CancelRun (self , run_id ): # NOQA
291
291
api = get_api ()
292
- request = api .container_requests ().update (uuid = workflow_id , body = {"priority" : 0 }).execute () # NOQA
293
- return {"workflow_id " : request ["uuid" ]}
292
+ request = api .container_requests ().update (uuid = run_id , body = {"priority" : 0 }).execute () # NOQA
293
+ return {"run_id " : request ["uuid" ]}
294
294
295
295
@catch_exceptions
296
- def GetWorkflowStatus (self , workflow_id ):
296
+ def GetRunStatus (self , run_id ):
297
297
api = get_api ()
298
- request = api .container_requests ().get (uuid = workflow_id ).execute ()
298
+ request = api .container_requests ().get (uuid = run_id ).execute ()
299
299
if request ["container_uuid" ]:
300
300
container = api .containers ().get (uuid = request ["container_uuid" ]).execute () # NOQA
301
301
elif request ["priority" ] == 0 :
302
302
container = {"state" : "Cancelled" }
303
303
else :
304
304
container = {"state" : "Queued" }
305
- return {"workflow_id " : request ["uuid" ],
305
+ return {"run_id " : request ["uuid" ],
306
306
"state" : statemap [container ["state" ]]}
307
307
308
308
309
- def dynamic_logs (workflow_id , logstream ):
309
+ def dynamic_logs (run_id , logstream ):
310
310
api = get_api ()
311
- cr = api .container_requests ().get (uuid = workflow_id ).execute ()
311
+ cr = api .container_requests ().get (uuid = run_id ).execute ()
312
312
l1 = [t ["properties" ]["text" ]
313
- for t in api .logs ().list (filters = [["object_uuid" , "=" , workflow_id ],
313
+ for t in api .logs ().list (filters = [["object_uuid" , "=" , run_id ],
314
314
["event_type" , "=" , logstream ]],
315
315
order = "created_at desc" ,
316
316
limit = 100 ).execute ()["items" ]]
@@ -327,5 +327,5 @@ def dynamic_logs(workflow_id, logstream):
327
327
328
328
def create_backend (app , opts ):
329
329
ab = ArvadosBackend (opts )
330
- app .app .route ('/ga4gh/wes/v1/workflows/<workflow_id >/x-dynamic-logs/<logstream>' )(dynamic_logs )
330
+ app .app .route ('/ga4gh/wes/v1/runs/<run_id >/x-dynamic-logs/<logstream>' )(dynamic_logs )
331
331
return ab
0 commit comments