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

Send confirmation even dry-run mode

parent 6055dfe3
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,!24Add notify user agent
...@@ -39,15 +39,14 @@ def notify_user(ch, method, properties, body): ...@@ -39,15 +39,14 @@ def notify_user(ch, method, properties, body):
except Exception as exception: except Exception as exception:
logger.error('', exc_info=True) logger.error('', exc_info=True)
if not args.dry_run: # acknowledge the message
# acknowledge the message ch.basic_ack(delivery_tag=method.delivery_tag)
ch.basic_ack(delivery_tag=method.delivery_tag)
# send confirm message
# send confirm message rc_rmq.publish_msg({
rc_rmq.publish_msg({ 'routing_key': 'confirm.' + username,
'routing_key': 'confirm.' + username, 'msg': msg
'msg': msg })
})
if __name__ == "__main__": if __name__ == "__main__":
......
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