refactor(core,ai): 调整模块导入路径并移除废弃文件

- 修复 scheduler.py 中的导入路径错误,将 reports.service
  改为 reports.services
- 移除废弃的 app/core/background/task_queue.py 文件
- 移除废弃的 app/modules/ai_agent/adapters.py 文件
- 修复 ai_memory/service.py 中的导入路径错误,将
  events.service 改为 events.services
```
This commit is contained in:
2026-07-09 18:50:52 +08:00
parent dc8605ce3f
commit bf309ecdf7
83 changed files with 4871 additions and 4153 deletions

16
app/tasks/risk.py Normal file
View File

@@ -0,0 +1,16 @@
from typing import Any
from app.core.constants import ActorValue
from app.core.database import SessionLocal
from app.tasks.app import celery_app
@celery_app.task(name="risks.generate_events")
def generate_risk_events(actor: str = ActorValue.SCHEDULER) -> dict[str, Any]:
from app.modules.risk.services import RiskService
db = SessionLocal()
try:
return RiskService(db).generate_events(actor=actor)
finally:
db.close()