This repository was archived by the owner on Aug 11, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,8 @@ def waitfor(params):
208208 or (state == 'Running' and params ['state' ] == 'Pending' )
209209 or state == 'Error'
210210 or state == 'Stopped'
211- or state == 'Failed' ):
211+ or state == 'Failed'
212+ or state == 'Cancelled' ):
212213 return job
213214 time .sleep (5 )
214215
@@ -231,7 +232,7 @@ def create(params, no_logging=False):
231232 print_json_pretty (job )
232233 return job
233234
234- if job ['state' ] != 'Error' :
235+ if job ['state' ] != 'Error' and job [ 'state' ] != 'Cancelled' :
235236 print ('Awaiting logs...' )
236237 if logs ({'jobId' : jobId }, tail = True ):
237238 job = method ('jobs' , 'getJob' , {'jobId' : jobId })
@@ -241,10 +242,12 @@ def create(params, no_logging=False):
241242 print_json_pretty (job )
242243 return job
243244
244- if job ['state' ] != 'Error' :
245- print ('Job %s; exitCode %d' % (job ['state' ], job ['exitCode' ]))
246- else :
245+ if job ['state' ] == 'Error' :
247246 print ('Job %s: %s' % (job ['state' ], job ['jobError' ]))
247+ elif job ['state' ] == 'Cancelled' :
248+ print ('Job %s' % (job ['state' ]))
249+ else :
250+ print ('Job %s; exitCode %d' % (job ['state' ], job ['exitCode' ]))
248251 return job
249252
250253
You can’t perform that action at this time.
0 commit comments