12th_fix error

This commit is contained in:
beabigegg
2025-09-04 09:44:13 +08:00
parent d638d682b7
commit 5662fcc039
19 changed files with 1735 additions and 50 deletions

View File

@@ -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