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

Wait until all the task return with success msg

parent ada8f477
No related branches found
No related tags found
2 merge requests!147Merge previous default branch feat-cod-rmq into main,!119Feat account management
......@@ -77,7 +77,15 @@ def callback(channel, method, properties, body):
msg = json.loads(body)
username = msg["username"]
if msg["success"]:
# Check if each task returned success
for each_task in msg["success"].values():
if each_task == True:
success=True
else:
success=False
break
if success:
print(f"Account for {username} has been {action}ed.\n Updating the user state in DB")
rc_util.update_state(username, state)
else:
......
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