From bcc5650f2d7fa61fd544c01e7d092b6cfc382457 Mon Sep 17 00:00:00 2001
From: Krish M <krish94@uab.edu>
Date: Mon, 16 May 2022 13:07:44 -0500
Subject: [PATCH 1/3] Added updated_by field

Variable added to identify person who updated user state
---
 tasks.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tasks.py b/tasks.py
index 72539c9..a5f3877 100644
--- a/tasks.py
+++ b/tasks.py
@@ -90,11 +90,12 @@ def celery_certify_account(json, session):
     email= json['email']
     fullname= json['fullname']
     queuename= rc_util.encode_name(username)
+    updated_by= f'{username}@login005'
 
     print("CERTIFY : "+time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue')
     send_msg('certifying account', room)
     print(username)
-    rc_util.certify_account(username, queuename, 'ok', 'all')
+    rc_util.certify_account(username, queuename, 'ok', 'all', updated_by)
     print('sent account info')
     print('Waiting for certification...')
     rc_util.consume(queuename, routing_key=f'certified.{queuename}', callback=certify_gen_f(room))
-- 
GitLab


From 651012b6ea06e22cd94ba9a84e966111652071b0 Mon Sep 17 00:00:00 2001
From: Krish M <krish94@uab.edu>
Date: Tue, 17 May 2022 21:40:32 -0500
Subject: [PATCH 2/3] added host variable & updated tasks to match rc_util
 parameters

---
 tasks.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tasks.py b/tasks.py
index a5f3877..2750527 100644
--- a/tasks.py
+++ b/tasks.py
@@ -90,12 +90,13 @@ def celery_certify_account(json, session):
     email= json['email']
     fullname= json['fullname']
     queuename= rc_util.encode_name(username)
-    updated_by= f'{username}@login005'
+    updated_by= f'{username}'
+    host= 'login005'
 
     print("CERTIFY : "+time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue')
     send_msg('certifying account', room)
     print(username)
-    rc_util.certify_account(username, queuename, 'ok', 'all', updated_by)
+    rc_util.certify_account(username, queuename, 'ok', 'all', updated_by, host)
     print('sent account info')
     print('Waiting for certification...')
     rc_util.consume(queuename, routing_key=f'certified.{queuename}', callback=certify_gen_f(room))
-- 
GitLab


From 0585cd18133afcd2abd8253db883b670d8d0bccf Mon Sep 17 00:00:00 2001
From: Krish M <krish94@uab.edu>
Date: Thu, 19 May 2022 10:39:25 -0500
Subject: [PATCH 3/3] parameterized app_host variable

---
 tasks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tasks.py b/tasks.py
index 2750527..b2eddf3 100644
--- a/tasks.py
+++ b/tasks.py
@@ -91,7 +91,7 @@ def celery_certify_account(json, session):
     fullname= json['fullname']
     queuename= rc_util.encode_name(username)
     updated_by= f'{username}'
-    host= 'login005'
+    host= vars.app_host 
 
     print("CERTIFY : "+time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue')
     send_msg('certifying account', room)
-- 
GitLab