Commit 3c69f990 authored by André Anjos's avatar André Anjos 💬
Browse files

If does not specify id, delete all jobs

parent 902252c5
......@@ -77,7 +77,9 @@ def remove(f):
def delete(args):
jm = setup(args)
for k in args.jobid:
jobs = jm.keys()
if args.jobid: jobs = args.jobid
for k in jobs:
if jm.has_key(k):
J = jm[k]
del jm[k]
......@@ -291,7 +293,7 @@ def main():
delparser = cmdparser.add_parser('delete', aliases=['del', 'rm', 'remove'],
help='removes jobs from the database; if jobs are running or are still scheduled in SGE, the jobs are also removed from the SGE queue')
delparser.add_argument('jobid', metavar='ID', nargs='+', type=int,
help='the SGE job identifiers as provided by the list command (first field)')
default=[], help='the SGE job identifiers as provided by the list command (first field)')
delparser.add_argument('-r', '--remove-logs', dest='also_logs', default=False, action='store_true', help='if set I\'ll also remove the logs if they exist')
delparser.set_defaults(func=delete)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment