diff --git a/account_manager.py b/account_manager.py index 98e7a3b89088fc6047c4389e45a02ee476a5632c..709f5dba7f0c12ca5269337e514552ef817448f1 100755 --- a/account_manager.py +++ b/account_manager.py @@ -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( diff --git a/prod_rmq_agents/acct_mgmt_workflow.py b/prod_rmq_agents/acct_mgmt_workflow.py index 7b7bc0cf7cb48ff9e045a918e8f599424a1c1a7a..3f39736e5c168bf67c9a0dcfab82c9dad9b8ecaa 100755 --- a/prod_rmq_agents/acct_mgmt_workflow.py +++ b/prod_rmq_agents/acct_mgmt_workflow.py @@ -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( {