Commit de3f51fa by larosa

add test

parent 2898159d
Showing with 15 additions and 15 deletions
......@@ -18,19 +18,19 @@ config_prod = {
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.hgetall("shop_distribution")
# print(ans)
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", "33836")
print(ans)
if __name__ == '__main__':
query_sql = "select * from lie_shop_push_sku_log"
db = pymysql.connect(host=conf["mysql"]["host"], port=3306, user=conf["mysql"]["user"], password=conf["mysql"]["password"], database=conf["mysql"]["database"])
cursor = db.cursor()
cursor.execute(query=query_sql)
results = cursor.fetchall()
print(results[0][4])
\ No newline at end of file
# if __name__ == '__main__':
# query_sql = "select * from lie_shop_push_sku_log"
# db = pymysql.connect(host=conf["mysql"]["host"], port=3306, user=conf["mysql"]["user"], password=conf["mysql"]["password"], database=conf["mysql"]["database"])
# cursor = db.cursor()
# cursor.execute(query=query_sql)
# results = cursor.fetchall()
# print(results[0][4])
\ 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