This commit is contained in:
aozhiwei 2020-11-26 17:36:36 +08:00
parent 5015343249
commit e2c64e7250

View File

@ -93,10 +93,14 @@ def fetchEvent():
handled_idx.append(row[0])
time.sleep(0.001);
else:
break
for idx in handled_idx:
cursor.execute('UPDATE `event` SET status = 1 WHERE idx = %d '
% (idx))
for idx in handled_idx:
cursor.execute('UPDATE `event` SET status = 1 WHERE idx = %d '
% (idx))
print('UPDATE `event` SET status = 1 WHERE idx = %d '
% (idx))
conn.commit()
if len(handled_idx) <= 0:
break
#end while
db_idx_hash[conf['instance_id']] = last_idx
@ -107,6 +111,7 @@ def fetchEventTimerFunc(refresh_time):
f7.app.createAsyncTask(done_callback, fetchEvent, ())
def dailyMail():
return
mysql_cluster_conf = json.loads(open(CONFIG_DIR + '/mailsender.mysql.cluster.json', 'r').read())
for conf in mysql_cluster_conf:
conn = pymysql.connect(host = conf['host'],