diff --git a/rc_util.py b/rc_util.py index f624f49e8ba797f60be14951cfbe2d1eacd0738d..05ff5c2992374dcc8ab52818d3ec37f869bb07e1 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 })