Update main.py
This commit is contained in:
parent
5abd0723f8
commit
accf227701
12
main.py
12
main.py
|
@ -1,11 +1,11 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# 项目主函数入口
|
# 项目主函数入口
|
||||||
import datetime
|
import datetime # datatime对time模块进行了更高级的封装,提供了更高级的接口。
|
||||||
import time
|
import time #time模块操作简单,速度快,适用于处理简单的时间计算和格式化
|
||||||
from commons.logUtil import logger
|
from commons.logUtil import logger #日志类工具
|
||||||
from controllers.prController import app
|
from controllers.prController import app #app是flask模块的实例,用于接收web服务器的请求
|
||||||
from services.pullService import check_and_update_pull
|
from services.pullService import check_and_update_pull
|
||||||
from threading import Thread
|
from threading import Thread #threading是python中专门提供用来做多线程的模块,Thread是主要的线程类
|
||||||
import config.baseConfig as baseConfig
|
import config.baseConfig as baseConfig
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ def run():
|
||||||
monitoring_thread.start()
|
monitoring_thread.start()
|
||||||
|
|
||||||
# 运行应用程序
|
# 运行应用程序
|
||||||
app.run(host=baseConfig.host, port=baseConfig.port)
|
app.run(host=baseConfig.host, port=baseConfig.port) #host:主机名,port:端口号
|
||||||
|
|
||||||
|
|
||||||
# 主程序入口
|
# 主程序入口
|
||||||
|
|
Loading…
Reference in New Issue