From 51700f4b2d50f961d2b68223b93eae37d7eff542 Mon Sep 17 00:00:00 2001
From: Bo-Chun Louis Chen <louistw@uab.edu>
Date: Mon, 18 Apr 2022 21:45:45 -0500
Subject: [PATCH] Disconnect in message handlers

Since we are using exclusive queue, simply disconnect from it will
remove the queue
---
 create_account.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/create_account.py b/create_account.py
index 98d2dba..d5ae3a2 100755
--- a/create_account.py
+++ b/create_account.py
@@ -34,7 +34,7 @@ if args.email == "":
 
 def timeout_handler(signum, frame):
     print("Process timeout, there's might some issue with agents")
-    rc_util.rc_rmq.stop_consume()
+    rc_util.rc_rmq.disconnect()
 
 
 def callback(channel, method, properties, body):
@@ -49,8 +49,7 @@ def callback(channel, method, properties, body):
         for err in errmsg:
             print(err)
 
-    rc_util.rc_rmq.stop_consume()
-    rc_util.rc_rmq.delete_queue()
+    rc_util.rc_rmq.disconnect()
 
 
 rc_util.add_account(
-- 
GitLab