commit
af3da08f90
5
main.py
5
main.py
|
@ -9,6 +9,7 @@ from threading import Thread
|
|||
import config.baseConfig as baseConfig
|
||||
|
||||
|
||||
# 监测函数
|
||||
def monitoring_loop():
|
||||
while True:
|
||||
check_and_update_pull()
|
||||
|
@ -16,8 +17,9 @@ def monitoring_loop():
|
|||
logger.info('执行定时任务 :' + now.strftime('%Y-%m-%d %H:%M:%S'))
|
||||
time.sleep(600)
|
||||
|
||||
|
||||
# 程序执行入口
|
||||
def run():
|
||||
#开启监测进程
|
||||
monitoring_thread = Thread(target=monitoring_loop)
|
||||
monitoring_thread.start()
|
||||
|
||||
|
@ -28,4 +30,3 @@ if __name__ == '__main__':
|
|||
run()
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue