test
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 6s

This commit is contained in:
Matthew Frost 2023-12-02 18:28:24 +01:00
parent 79c240c2f5
commit 0f4343acd2

View file

@ -4,8 +4,9 @@ from flask import jsonify
from app.settings import powerbars
from app.utils import get_baytech_status_outlet
from flask_socketio import SocketIO, emit
from gevent import monkey
socketio = SocketIO(engineio_logger=True, logger=True, cors_allowed_origins="*")
socketio = SocketIO(async_mode="gevent", logger=True, engineio_logger=True, cors_allowed_origins="*")
@socketio.on('connect', namespace='/powerupdates')
def connect_handler():
@ -48,3 +49,5 @@ def not_authorised(e):
def internal_server_error(e):
return jsonify(error="Internal server error"), 500
if not app.config["DEBUG"]:
monkey.patch_all()