From dcad6010a78799963889dab04ae2cab59bd6148d Mon Sep 17 00:00:00 2001 From: "Bo-Chun Louis Chen(VM)" <louistw@uab.edu> Date: Sat, 22 Feb 2020 06:45:29 +0000 Subject: [PATCH] Introduce new exchange confirm --- rc_util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rc_util.py b/rc_util.py index f624f49..05ff5c2 100644 --- a/rc_util.py +++ b/rc_util.py @@ -2,6 +2,7 @@ from rc_rmq import RCRMQ import json rc_rmq = RCRMQ({'exchange': 'Request'}) +confirm_rmq = RCRMQ({'exchange': 'Confirm'}) tasks = {'ohpc_account': False, 'ohpc_homedir': False, 'ood_account': False, 'slurm_account': False} def add_account(username, full='', reason=''): @@ -28,13 +29,14 @@ def worker(ch, method, properties, body): if not status: done = False if done: - rc_rmq.stop_consume() + confirm_rmq.stop_consume() + confirm_rmq.delete_queue() def consume(username, worker, debug=False): if debug: sleep(5) else: - rc_rmq.start_consume({ + confirm_rmq.start_consume({ 'queue': username, 'cb': worker }) -- GitLab