2019-03-10 22:29:29 +02:00
|
|
|
import tornado.ioloop
|
2019-05-24 05:16:15 -07:00
|
|
|
import logging
|
2019-03-10 22:29:29 +02:00
|
|
|
from app.ChameleonVisionApp import ChameleonApplication
|
2019-04-13 11:57:43 -07:00
|
|
|
from app.classes.SettingsManager import SettingsManager
|
2019-03-10 22:29:29 +02:00
|
|
|
from tornado.options import options
|
2019-04-26 21:35:35 +03:00
|
|
|
from app.handlers.VisionHandler import VisionHandler
|
2019-03-10 22:29:29 +02:00
|
|
|
|
2019-05-24 05:16:15 -07:00
|
|
|
|
2019-05-10 07:01:39 -07:00
|
|
|
def run_server():
|
2019-03-10 22:29:29 +02:00
|
|
|
tornado.options.parse_command_line()
|
|
|
|
|
app = ChameleonApplication()
|
|
|
|
|
print(f"Serving on port {options.port}")
|
|
|
|
|
app.listen(options.port)
|
|
|
|
|
tornado.ioloop.IOLoop.current().start()
|
2019-04-14 11:55:07 -07:00
|
|
|
|
2019-05-10 07:01:39 -07:00
|
|
|
|
2019-05-24 05:16:15 -07:00
|
|
|
if __name__ == "__main__":
|
|
|
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
|
|
|
SettingsManager()
|
2019-05-10 07:01:39 -07:00
|
|
|
|
2019-05-24 05:16:15 -07:00
|
|
|
VisionHandler().run()
|
2019-06-14 08:35:42 -07:00
|
|
|
run_server()
|
2019-05-10 07:01:39 -07:00
|
|
|
|
2019-06-14 08:35:42 -07:00
|
|
|
while True:
|
|
|
|
|
pass
|