From 78610b03e3eb5f16d2d2948370db2b1ff2be1793 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 9 Jun 2014 12:42:34 -0500 Subject: [PATCH] Remote 'delete' and 'show' features Signed-off-by: Zack Cerza --- scripts/schedule.py | 14 -------------- teuthology/schedule.py | 23 ----------------------- 2 files changed, 37 deletions(-) diff --git a/scripts/schedule.py b/scripts/schedule.py index 62732f2d10..6a43e5e6d8 100644 --- a/scripts/schedule.py +++ b/scripts/schedule.py @@ -50,13 +50,6 @@ def parse_args(): '--owner', help='job owner', ) - parser.add_argument( - '--delete', - metavar='JOBID', - type=int, - nargs='*', - help='list of jobs to remove from the queue', - ) parser.add_argument( '-n', '--num', default=1, @@ -80,13 +73,6 @@ def parse_args(): default='plana', help='which worker to use (type of machine)', ) - parser.add_argument( - '-s', '--show', - metavar='JOBID', - type=int, - nargs='*', - help='output the contents of specified jobs in the queue', - ) args = parser.parse_args() diff --git a/teuthology/schedule.py b/teuthology/schedule.py index a147e3d164..6efe0518d4 100644 --- a/teuthology/schedule.py +++ b/teuthology/schedule.py @@ -16,29 +16,6 @@ def main(ctx): tube = ctx.worker beanstalk.use(tube) - if ctx.show: - for job_id in ctx.show: - job = beanstalk.peek(job_id) - if job is None and ctx.verbose: - print 'job {jid} is not in the queue'.format(jid=job_id) - else: - print '--- job {jid} priority {prio} ---\n'.format( - jid=job_id, - prio=job.stats()['pri']), job.body - return - - if ctx.delete: - for job_id in ctx.delete: - job = beanstalk.peek(job_id) - if job is None: - print 'job {jid} is not in the queue'.format(jid=job_id) - else: - job.delete() - name = yaml.safe_load(job.body).get('name') - if name: - report.try_delete_jobs(name, job_id) - return - # strip out targets; the worker will allocate new ones when we run # the job with --lock. if ctx.config.get('targets'): -- 2.39.5