Commit 5f433969 by 岳巧源

add vc

parent ebf724a6
Showing with 9 additions and 10 deletions
...@@ -277,15 +277,14 @@ def insert_ext_attr_to_redis(conf: dict): ...@@ -277,15 +277,14 @@ 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"] # def delete_redis_key(key: str, conf: dict):
redis_port = conf["redis"]["port"] # redis_host = conf["redis"]["host"]
redis_password = conf["redis"]["password"] # redis_port = conf["redis"]["port"]
redis_db = redis.Redis(host=redis_host, port=redis_port, password=redis_password) # redis_password = conf["redis"]["password"]
redis_db.delete(key) # 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_prod pass
delete_redis_key("jd_ext_attr", conf) \ No newline at end of file
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