소스 검색

fix: event handlers not registered globally (#2479)

takatost 1 년 전
부모
커밋
1bd1cd6938
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      api/app.py
  2. 1 0
      api/pyproject.toml

+ 3 - 2
api/app.py

@@ -38,10 +38,11 @@ from extensions import (
 from extensions.ext_database import db
 from extensions.ext_login import login_manager
 from libs.passport import PassportService
-
-# DO NOT REMOVE BELOW
 from services.account_service import AccountService
 
+# DO NOT REMOVE BELOW
+from events import event_handlers
+from models import account, dataset, model, source, task, tool, tools, web
 # DO NOT REMOVE ABOVE
 
 

+ 1 - 0
api/pyproject.toml

@@ -3,6 +3,7 @@ requires-python = ">=3.10"
 
 [tool.ruff]
 exclude = [
+    "app.py",
     "__init__.py",
     "tests/",
 ]