Commit ce7b54c5 by 陈森彬

update

parent 237d7049
Showing with 8 additions and 4 deletions
......@@ -13,7 +13,8 @@ ENV = 'test' if sys.platform in ('darwin', 'win32') else 'produce'
def get_redis_conf():
conf = {
'host': '192.168.1.235',
# 'host': '192.168.1.235',
'host': '39.108.51.147',
'port': 6379,
'password': "icDb29mLy2s",
'db': 0,
......@@ -34,10 +35,13 @@ redis_pool = get_redis_conn()
def main():
brand_list = ["英飞凌"]
brand_list = ["ROHM(罗姆)"]
for brand_name in brand_list:
redis_pool.sadd("brand_set", brand_name)
print("添加品牌",brand_name)
res = redis_pool.sadd("brand_set", brand_name)
if res:
print("添加品牌",brand_name)
else:
print("添加品牌失败", brand_name)
if __name__ == "__main__":
......
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