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

Update account manager with updated_by field

parent 557c7666
No related branches found
No related tags found
2 merge requests!147Merge previous default branch feat-cod-rmq into main,!127Add updated_by field to user_state table
......@@ -40,6 +40,7 @@ msg["username"] = username
msg["state"] = state
msg["service"] = service
msg["queuename"] = queuename
msg["updated_by"] = rc_util.get_caller_info()
# publish msg with acctmgr.{uname} routing key.
rc_rmq.publish_msg(
......
......@@ -37,7 +37,7 @@ def manage_acct(ch, method, properties, body):
msg["action"] = "unlock"
else:
print("Invalid state provided. Check the help menu.")
if service == 'all':
current["new_jobs"] = None
current["expire_account"] = None
......@@ -54,7 +54,7 @@ def manage_acct(ch, method, properties, body):
rc_rmq.publish_msg(
{
"routing_key": f"{each_service}.{queuename}",
"msg": msg
"msg": msg
}
)
......@@ -70,8 +70,8 @@ def manage_acct(ch, method, properties, body):
done = False
if done:
rc_util.update_state(username, state)
rc_util.update_state(username, state, msg.get("updated_by"))
# Send done msg to account_manager.py
rc_rmq.publish_msg(
{
......
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