From 8f0ca6570d6ced513b7a60a43ed3f27764702292 Mon Sep 17 00:00:00 2001 From: atlurie <atlurie@uab.edu> Date: Thu, 7 Apr 2022 15:02:10 -0500 Subject: [PATCH] Update user state in db after agents finished successfully --- account_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_manager.py b/account_manager.py index 91a8d10..30265d1 100755 --- a/account_manager.py +++ b/account_manager.py @@ -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", []) -- GitLab