"prod_rmq_agents/git@gitlab.rc.uab.edu:rc/rabbitmq_agents.git" did not exist on "a812e75f9faa731d800fa8f5c2ab797a67f8f57a"
Newer
Older
rc_rmq = RCRMQ({'exchange': 'RegUsr', 'exchange_type': 'topic'})
tasks = {'ohpc_account': None, 'ood_account': None, 'slurm_account': None}
def add_account(username, email, full='', reason=''):
'routing_key': 'request.' + username,
def worker(ch, method, properties, body):
msg = json.loads(body)
task = msg['task']
tasks[task] = msg['success']
print("Got msg: {}({})".format(msg['task'], msg['success']))
# Check if all tasks are done
done = True
for key, status in tasks.items():
if not status:
def consume(username, callback=worker, debug=False):
'routing_key': 'confirm.' + username,