Commit a8b447e7 authored by 张彦钊's avatar 张彦钊

change test

parent 7539d39a
......@@ -156,18 +156,12 @@ def to_data_base(df):
if old_number > 0:
db = pymysql.connect(host='172.16.40.158', port=4000, user='root',
passwd='3SYz54LS9#^9sBvC', db='jerry_test')
sql = "delete from esmm_resort_diary_queue where device_id in {} limit 2000".format(tuple(old_uid))
if old_number > 2000:
cursor = db.cursor()
for i in range(int(old_number/2000)+1):
cursor.execute(sql)
db.commit()
cursor.close()
else:
cursor = db.cursor()
cursor.execute(sql)
db.commit()
cursor.close()
sql = "delete from esmm_resort_diary_queue where device_id in {}".format(tuple(old_uid))
cursor = db.cursor()
cursor.execute(sql)
db.commit()
cursor.close()
db.close()
yconnect = create_engine('mysql+pymysql://root:3SYz54LS9#^9sBvC@172.16.40.158:4000/jerry_test?charset=utf8')
......
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