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