We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de7ce6e commit 3b08a0aCopy full SHA for 3b08a0a
1 file changed
bin/drqueue
@@ -273,6 +273,10 @@ def job_list(args):
273
jobs = client.query_job_list()
274
print "Listing all jobs"
275
276
+ if len(jobs) == 0:
277
+ print('No jobs found')
278
+ sys.exit(-1)
279
+
280
# run action on every job
281
for job in jobs:
282
# walk through tasks of every job
@@ -459,8 +463,13 @@ def job_delete(args):
459
463
460
464
461
465
462
- client.job_delete(job['_id'])
- print("Job %s has been deleted.\n" % job['name'])
466
+ if job == None:
467
+ print('ERROR: No such job')
468
469
+ if client.job_delete(job['_id']) == True:
470
+ print("Job %s has been deleted.\n" % job['name'])
471
+ else:
472
+ print("Job %s could not be deleted.\n" % job['name'])
473
474
475
def job_continue(args):
0 commit comments