Commit f52ec43f authored by litaolemo's avatar litaolemo

update

parent d47a7c29
......@@ -866,7 +866,9 @@ import redis
import json
headers = {'X-GAIA-HELIOS-VERSION': '0.7.4','X-GM-Request-Id': '123','x-gm-path': '/6261582/','X-GM-Rpc-Method': 'doris/search/query_sku',}
# 测试
# rds = redis.StrictRedis.from_url("redis://172.18.51.17:6379/21", decode_responses=True)
# 正式
rds = redis.StrictRedis.from_url("redis://:XfkMCCdWDIU%ls$h3@172.16.50.159:6379", decode_responses=True)
for city in city_list:
redis_key = "service_icon_{}".format(city)
......@@ -881,12 +883,13 @@ for city in city_list:
# print(data)
response = requests.post('http://172.16.50.10:8050/v1/batch', headers=headers, data=data)
# response = requests.post('http://doris.paas-develop.env/v1/batch', headers=headers, data=data)
data = json.dumps(response.json())
# print(data)
time.sleep(0.2)
time.sleep(0.1)
# dict[query] = data
rds.hset(redis_key,query, data)
rds.hset(redis_key,query_list[query], data)
print(redis_key,query)
except Exception as e:
print(e)
......
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 to comment