import sys sys.path.insert(0, ".") from tracker import logger, config logger.setup_logging() from tracker.terminal_colors import colorise, colors as cols colors = cols.fg print(colorise(''' =============================== ╦ ╦╦ ╔═╗╔═╗╔═╗ ║║║║ ╠═╣╠═╝╠═╝ ╚╩╝╩═╝ ╩ ╩╩ ╩ =============================== ''', colors.lightcyan)) print(colorise(f''' VERSION: {config.sha} ''', colors.lightblue)) print(colorise(''' ================================= ''', colors.lightcyan)) from werkzeug.middleware.profiler import ProfilerMiddleware # from gevent.pywsgi import WSGIServer from api.api import app as application application.config['GIT_HASH'] = config.sha from tracker import config if config.api_enable_profiler: application.config['PROFILE'] = True application.wsgi_app = ProfilerMiddleware(application.wsgi_app, restrictions=[30]) if __name__ == '__main__': application.run(debug=config.api_use_debug, threaded=True, host='0.0.0.0', port=5000) #http_server = WSGIServer(('0.0.0.0', 5000), application) #http_server.serve_forever()