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

Update user state in db after agents finished successfully

parent 1ca22911
No related branches found
No related tags found
2 merge requests!147Merge previous default branch feat-cod-rmq into main,!119Feat account management
......@@ -65,10 +65,10 @@ def timeout_handler(signum, frame):
def callback(channel, method, properties, body):
msg = json.loads(body)
username = msg["username"]
msg["success"] = false
if msg["success"]:
print(f"Account for {username} has been blocked :.")
print(f"Account for {username} has been blocked.\n Updating the user state in DB")
rc_util.update_state(username, state)
else:
print(f"There's some issue in account management agents for {username}")
errmsg = msg.get("errmsg", [])
......
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