summaryrefslogtreecommitdiff
path: root/Code/get_mapped_data.py
diff options
context:
space:
mode:
Diffstat (limited to 'Code/get_mapped_data.py')
-rw-r--r--Code/get_mapped_data.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Code/get_mapped_data.py b/Code/get_mapped_data.py
index d1a4146..ea125a0 100644
--- a/Code/get_mapped_data.py
+++ b/Code/get_mapped_data.py
@@ -5,7 +5,9 @@ import redis # install redis on Ubuntu using this command: sudo apt install pyth
import json
import os
-r = redis.Redis(host='118.25.96.118', port=6379, db=0)
+redis_password = os.getenv('REDIS_PASSWORD', '123456')
+redis_host = os.getenv('REDIS_HOST', '127.0.0.1')
+r = redis.Redis(host=redis_host, port=6379, password=redis_password, db=0)
pubsub = r.pubsub(ignore_subscribe_messages=True)
pubsub.subscribe(REDIS_CHANNEL)