test
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 6s
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 6s
This commit is contained in:
parent
79c240c2f5
commit
0f4343acd2
1 changed files with 4 additions and 1 deletions
|
@ -4,8 +4,9 @@ from flask import jsonify
|
||||||
from app.settings import powerbars
|
from app.settings import powerbars
|
||||||
from app.utils import get_baytech_status_outlet
|
from app.utils import get_baytech_status_outlet
|
||||||
from flask_socketio import SocketIO, emit
|
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')
|
@socketio.on('connect', namespace='/powerupdates')
|
||||||
def connect_handler():
|
def connect_handler():
|
||||||
|
@ -48,3 +49,5 @@ def not_authorised(e):
|
||||||
def internal_server_error(e):
|
def internal_server_error(e):
|
||||||
return jsonify(error="Internal server error"), 500
|
return jsonify(error="Internal server error"), 500
|
||||||
|
|
||||||
|
if not app.config["DEBUG"]:
|
||||||
|
monkey.patch_all()
|
||||||
|
|
Loading…
Reference in a new issue