reworked structure and improved performance to handle 500 concurrent users
This commit is contained in:
@@ -9,7 +9,7 @@ from app.auth import init_auth
|
||||
from app.seed_db import seed_courses
|
||||
from app.config import Config
|
||||
|
||||
socketio = SocketIO(async_mode='eventlet', cors_allowed_origins="*")
|
||||
socketio = SocketIO(async_mode='eventlet', cors_allowed_origins="*", message_queue='redis://redis:6379')
|
||||
|
||||
def create_app(config_class=Config):
|
||||
# 1. Setup Log Directory
|
||||
@@ -42,5 +42,13 @@ def create_app(config_class=Config):
|
||||
socketio.init_app(app)
|
||||
|
||||
from .routes import main
|
||||
from .blueprints.slides import slides_bp
|
||||
from .blueprints.admin import admin_bp
|
||||
from .blueprints.grafana import grafana_bp
|
||||
|
||||
app.register_blueprint(main)
|
||||
app.register_blueprint(slides_bp)
|
||||
app.register_blueprint(admin_bp)
|
||||
app.register_blueprint(grafana_bp)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user