1
This commit is contained in:
parent
a5f277c4b6
commit
8fb7d5f687
@ -11,8 +11,11 @@ import json
|
||||
|
||||
CONFIG_DIR = '../config' if f7.isOnlineEnv() else '/var/data/conf_test/mailsender/config'
|
||||
|
||||
def fetchEvent(refresh_time):
|
||||
pass
|
||||
def fetchEventTimerFunc(refresh_time):
|
||||
def done_callback():
|
||||
f7.timer.callLater(refresh_time,
|
||||
lambda : fetchEventTimerFunc(refresh_time))
|
||||
f7.app.createAsyncTask(done_callback, incrementUpdateRank, ())
|
||||
|
||||
def getConf():
|
||||
cluster_conf = json.loads(open(CONFIG_DIR + '/mailsender.cluster.json', 'r').read())
|
||||
@ -34,7 +37,7 @@ if __name__ == "__main__":
|
||||
# f7.app.registerHandler('Login', 'auth', __loginAuth)
|
||||
conf['refresh_time'] = 10
|
||||
f7.timer.callLater(conf['refresh_time'],
|
||||
lambda : fetchEvent(conf['refresh_time']))
|
||||
lambda : fetchEventTimerFunc(conf['refresh_time']))
|
||||
|
||||
f7.app.listen(conf['listen_port'])
|
||||
f7.app.start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user