Skip to content

Commit

Permalink
scripts/queue: common teuthology-queue command for paddles and beanst…
Browse files Browse the repository at this point in the history
…alk queue

Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
  • Loading branch information
amathuria committed Apr 20, 2022
1 parent 9a8b1ee commit 99bd46f
Show file tree
Hide file tree
Showing 12 changed files with 255 additions and 334 deletions.
2 changes: 1 addition & 1 deletion scripts/beanstalk_queue.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import docopt

import teuthology.config
import teuthology.beanstalk
import teuthology.queue.beanstalk

doc = """
usage: teuthology-beanstalk-queue -h
Expand Down
3 changes: 1 addition & 2 deletions scripts/paddles_queue.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import docopt

import teuthology.config
import teuthology.paddles_queue

import teuthology.queue.paddles_queue
doc = """
usage: teuthology-paddles-queue -h
teuthology-paddles-queue -s -m MACHINE_TYPE
Expand Down
37 changes: 37 additions & 0 deletions scripts/queue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import docopt

import teuthology.config
import teuthology.queue.beanstalk
import teuthology.queue.paddles

doc = """
usage: teuthology-queue -h
teuthology-queue [-s|-d|-f] -m MACHINE_TYPE
teuthology-queue [-r] -m MACHINE_TYPE
teuthology-queue -m MACHINE_TYPE -D PATTERN
teuthology-queue -p SECONDS [-m MACHINE_TYPE]
List Jobs in queue.
If -D is passed, then jobs with PATTERN in the job name are deleted from the
queue.
Arguments:
-m, --machine_type MACHINE_TYPE [default: multi]
Which machine type queue to work on.
optional arguments:
-h, --help Show this help message and exit
-D, --delete PATTERN Delete Jobs with PATTERN in their name
-d, --description Show job descriptions
-r, --runs Only show run names
-f, --full Print the entire job config. Use with caution.
-s, --status Prints the status of the queue
-p, --pause SECONDS Pause queues for a number of seconds. A value of 0
will unpause. If -m is passed, pause that queue,
otherwise pause all queues.
"""


def main():
args = docopt.docopt(doc)
teuthology.queue.main(args)
2 changes: 1 addition & 1 deletion teuthology/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class TeuthologyConfig(YamlConfig):
'archive_upload_key': None,
'archive_upload_url': None,
'automated_scheduling': False,
'backend': 'paddles',
'backend': 'beanstalk',
'reserve_machines': 5,
'ceph_git_base_url': 'https://github.com/ceph/',
'ceph_git_url': None,
Expand Down
5 changes: 1 addition & 4 deletions teuthology/dispatcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from time import sleep

from teuthology import setup_log_file, install_except_hook
from teuthology import beanstalk
from teuthology.queue import beanstalk
from teuthology import report
from teuthology.config import config as teuth_config
from teuthology.exceptions import SkipJob
Expand Down Expand Up @@ -73,11 +73,8 @@ def main(args):
machine_type = args["--machine-type"]
log_dir = args["--log-dir"]
archive_dir = args["--archive-dir"]
<<<<<<< HEAD
exit_on_empty_queue = args["--exit-on-empty-queue"]
=======
backend = args['--queue-backend']
>>>>>>> 79c4d9bf... Add beanstalk as a possible queue backend for Teuthology Jobs along with Paddles

if archive_dir is None:
archive_dir = teuth_config.archive_base
Expand Down
2 changes: 1 addition & 1 deletion teuthology/kill.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
import getpass

from teuthology import beanstalk
from teuthology.queue import beanstalk
from teuthology import report
from teuthology.config import config
from teuthology import misc
Expand Down
218 changes: 0 additions & 218 deletions teuthology/paddles_queue.py

This file was deleted.

Loading

0 comments on commit 99bd46f

Please sign in to comment.