1234567891011121314151617181920212223242526 |
- from app import generate_app
- app = generate_app()
- def main():
- # 定时任务
- # from lib.JobManage import JobManage
- # JobManage.run()
- # 监听mqtt消息服务
- from unit.VehicleStateMessageListener import VehicleStateMessageListener
- VehicleStateMessageListener.run_background(background_is=True)
- # 监听mqtt消息服务
- from unit.PotDataMessageListener import PotDataMessageListener
- PotDataMessageListener.run_background(background_is=True)
- # 给websocket发数据的
- # from factories.line_manage import LineManage
- # LineManage.run_background()
- # websocket服务/api服务
- app.run(address='0.0.0.0', port=5042, debug=True)
- if __name__ == '__main__':
- main()
|