Skip to content
Snippets Groups Projects
Commit ba2041de authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

Adapt to new msg passing model to see all event msgs.

parent d97831ba
No related branches found
No related tags found
6 merge requests!147Merge previous default branch feat-cod-rmq into main,!85kill nginx process running under user from login node,!51Fix acct create wait,!32Feat user reg event logger,!39WIP:Feat cod rmq,!38WIP: Feat cod rmq
......@@ -13,18 +13,13 @@ def log_user_reg_events(ch, method, properties, body):
# Retrieve message
msg = json.loads(body)
#print(msg)
# Retrieve routing key
routing_key = method.routing_key
action = routing_key.split(".")[0]
user = routing_key.split(".")[1]
if action != 'confirm':
print(f'Got a message for {user}: {routing_key}')
else:
task = msg['task']
status = msg['success']
print(f'Task {task} completed?: {status}')
print(f'Got a {action} message for {user} with routing key: {routing_key}')
print(msg)
# Acknowledge message
ch.basic_ack(delivery_tag=method.delivery_tag)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment