Allow setting SocketIO async mode from envvar or config.py (#773)

* Allow setting SocketIO async mode from envvar or config.py
This commit is contained in:
Kevin Chung
2018-12-01 19:20:36 -05:00
committed by GitHub
parent e2ff705494
commit 66c749fce6
3 changed files with 9 additions and 1 deletions

View File

@@ -134,6 +134,7 @@ def create_app(config='CTFd.config.Config'):
# If you have multiple workers you must have a shared cache
socketio.init_app(
app,
async_mode=app.config.get('SOCKETIO_ASYNC_MODE'),
message_queue=app.config.get('CACHE_REDIS_URL')
)