Commit ebf724a6 by 岳巧源

config prod

parent 3a6c66da
Showing with 10 additions and 1 deletions
...@@ -277,7 +277,15 @@ def insert_ext_attr_to_redis(conf: dict): ...@@ -277,7 +277,15 @@ def insert_ext_attr_to_redis(conf: dict):
print("jd_ext_attr", key, value) print("jd_ext_attr", key, value)
def delete_redis_key(key: str, conf: dict):
redis_host = conf["redis"]["host"]
redis_port = conf["redis"]["port"]
redis_password = conf["redis"]["password"]
redis_db = redis.Redis(host=redis_host, port=redis_port, password=redis_password)
redis_db.delete(key)
if __name__ == '__main__': if __name__ == '__main__':
conf = config_dev conf = config_prod
delete_redis_key("jd_ext_attr", conf)
insert_ext_attr_to_redis(conf) insert_ext_attr_to_redis(conf)
\ 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