Commit 8f155c59 by 岳巧源

add test3

parent 98d9550f
Showing with 9 additions and 4 deletions
...@@ -9,19 +9,24 @@ config_prod = { ...@@ -9,19 +9,24 @@ config_prod = {
"password": "sfj09JjsfpQx0", "password": "sfj09JjsfpQx0",
"database": "liexin_data_distribution" "database": "liexin_data_distribution"
}, },
"redis": { "redis1": {
"host": "172.18.137.38", "host": "172.18.137.38",
"port": 6379, "port": 6379,
"password": "icDb29mLy2s" "password": "icDb29mLy2s"
},
"redis2": {
"host": "spu-redis.ichunt.db",
"port": 6379,
"password": "icDb29mLy1s",
} }
} }
conf = config_prod conf = config_prod
if __name__ == '__main__': if __name__ == '__main__':
host = conf["redis"]["host"] host = conf["redis2"]["host"]
port = conf["redis"]["port"] port = conf["redis2"]["port"]
password = conf["redis"]["password"] password = conf["redis2"]["password"]
db = redis.Redis(host=host, port=port, password=password, decode_responses=True) db = redis.Redis(host=host, port=port, password=password, decode_responses=True)
# ans = db.hget("jd_ext_attr", "33836") # ans = db.hget("jd_ext_attr", "33836")
ans = db.hget("spu", "2172358037068768407") ans = db.hget("spu", "2172358037068768407")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment