Commit 1e79b7da by 岳巧源

add redis

parent 76c81c84
Showing with 27 additions and 0 deletions
import redis
config_prod = {
"mysql": {
"host": "bigdata2.ichunt.db",
"port": 3306,
"user": "DsbuUx",
"password": "sfj09JjsfpQx0",
"database": "liexin_data_distribution"
},
"redis": {
"host": "172.18.137.38",
"port": 6379,
"password": "icDb29mLy2s"
}
}
conf = config_prod
if __name__ == '__main__':
host = conf["redis"]["host"]
port = conf["redis"]["port"]
password = conf["redis"]["password"]
db = redis.Redis(host=host, port=port, password=password, decode_responses=True)
ans = db.hget("jd_ext_attr", "35917")
print(ans)
\ No newline at end of file
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