12th_fix error
This commit is contained in:
@@ -125,7 +125,7 @@ def create_app(config_name=None):
|
||||
# 建立資料表
|
||||
with app.app_context():
|
||||
# 導入模型
|
||||
from app.models import User, TranslationJob, JobFile, TranslationCache, APIUsageStats, SystemLog
|
||||
from app.models import User, TranslationJob, JobFile, TranslationCache, APIUsageStats, SystemLog, Notification
|
||||
|
||||
db.create_all()
|
||||
|
||||
@@ -135,6 +135,10 @@ def create_app(config_name=None):
|
||||
# 創建 Celery 實例
|
||||
app.celery = make_celery(app)
|
||||
|
||||
# 初始化 WebSocket
|
||||
from app.websocket import init_websocket
|
||||
app.socketio = init_websocket(app)
|
||||
|
||||
app.logger.info("Flask application created successfully")
|
||||
return app
|
||||
|
||||
|
Reference in New Issue
Block a user