setup_log_file,
install_except_hook,
# modules
- beanstalk,
exporter,
report,
repo_utils,
from teuthology.lock import ops as lock_ops
from teuthology.util.time import parse_timestamp
from teuthology import safepath
+from teuthology.jobqueue.base import QueueDirection
+import teuthology.jobqueue.choice
+
log = logging.getLogger(__name__)
start_time = datetime.datetime.now(datetime.timezone.utc)
load_config(archive_dir=archive_dir)
- connection = beanstalk.connect()
- beanstalk.watch_tube(connection, args.tube)
+ queue = teuthology.jobqueue.choice.from_config(args.tube, QueueDirection.OUT)
result_proc = None
if teuth_config.teuthology_path is None:
if rc is not None:
worst_returncode = max([worst_returncode, rc])
job_procs.remove(proc)
- job = connection.reserve(timeout=60)
+ job = queue.get()
if job is None:
if args.exit_on_empty_queue and not job_procs:
log.info("Queue is empty and no supervisor processes running; exiting!")
job.bury()
job_id = job.jid
log.info('Reserved job %d', job_id)
- log.info('Config is: %s', job.body)
- job_config = yaml.safe_load(job.body)
+ job_config = job.job_config()
+ log.info('Config is: %s', job_config)
job_config['job_id'] = str(job_id)
if job_config.get('stop_worker'):