about summary refs log tree commit diff
path: root/scripts/authentication/group.py
diff options
context:
space:
mode:
authorzsloan2021-10-04 21:09:15 +0000
committerzsloan2021-10-04 21:09:15 +0000
commit4c6a7e46dd7afe311c0bed38c4a69ddadf3cb416 (patch)
treea5fb925c976ad58d222359ff4331d7aca7dc8d11 /scripts/authentication/group.py
parent35a970adba5ee1d60769a81b446122a60eac9494 (diff)
downloadgenenetwork2-4c6a7e46dd7afe311c0bed38c4a69ddadf3cb416.tar.gz
Moved REDIS_CONN back into if __name__ == '__main__' since it doesn't need to be globally accessed anymore (I think I intiially moved it because I was calling it in create_group_data, but that ended up being unnecessary
Diffstat (limited to 'scripts/authentication/group.py')
-rw-r--r--scripts/authentication/group.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/authentication/group.py b/scripts/authentication/group.py
index a5f75aad..76c7fb4f 100644
--- a/scripts/authentication/group.py
+++ b/scripts/authentication/group.py
@@ -32,8 +32,6 @@ import json
 
 from typing import Dict, List, Optional, Set
 
-REDIS_CONN = redis.Redis(decode_responses=True)
-
 def create_group_data(users: Dict, target_group: str,
                       members: Optional[str] = None,
                       admins: Optional[str] = None) -> Dict:
@@ -112,6 +110,8 @@ if __name__ == "__main__":
 
     members = args.members if args.members else None
     admins = args.admins if args.admins else None
+
+    REDIS_CONN = redis.Redis(decode_responses=True)
     USERS = REDIS_CONN.hgetall("users")
 
     if not any([members, admins]):