Skip to content
Snippets Groups Projects
Commit 550583ce authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Update confirmation message

parent 66d7dbf2
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,!39WIP:Feat cod rmq,!38WIP: Feat cod rmq,!22Feat dir verify agent
......@@ -18,7 +18,8 @@ rc_rmq = RCRMQ({'exchange': 'RegUsr', 'exchange_type': 'topic'})
def dir_verify(ch, method, properties, body):
msg = json.loads(body)
username = msg['username']
success = False
msg['task'] = task
msg['success'] = False
try:
for d in dirs:
......@@ -37,7 +38,7 @@ def dir_verify(ch, method, properties, body):
logger.debug(f'{path} created')
success = True
msg['success'] = True
except Exception as exception:
logger.error('', exc_info=True)
......@@ -45,10 +46,7 @@ def dir_verify(ch, method, properties, body):
# send confirm message
rc_rmq.publish_msg({
'routing_key': 'confirm.' + username,
'msg': {
'task': task,
'success': success
}
'msg': msg
})
logger.debug(f'User {username} confirmation sent')
......
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