summaryrefslogtreecommitdiff
path: root/Code/get_mapped_data.py
diff options
context:
space:
mode:
authorLan Hui <lanhui@zjnu.edu.cn>2025-07-31 20:35:23 +0800
committerLan Hui <lanhui@zjnu.edu.cn>2025-07-31 20:35:23 +0800
commitf35a7dacbebae1fad36afaab5a66ff1379f604f4 (patch)
tree71f283bf68c48a5a45b54ecc071ffede54f3dd7b /Code/get_mapped_data.py
parent3d12f43570fd8f95cd0d0a716f002fbce888ddce (diff)
Test redis tomorrow morning
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)