feat: 完善人工关注与内容合规配置

This commit is contained in:
2026-08-24 17:49:56 +08:00
parent 6ffdd2c259
commit 910e67bd89
53 changed files with 1808 additions and 49 deletions

View File

@@ -16,6 +16,7 @@ from app.services.maintenance_service import MaintenanceService
from app.services.periodic_report_worker import PeriodicReportWorker
from app.services.topic_settlement_worker import TopicSettlementWorker
from app.services.agent_batch_test_worker import AgentBatchTestWorker
from app.services.human_attention_worker import HumanAttentionWorker
@asynccontextmanager
@@ -28,12 +29,13 @@ async def lifespan(app: FastAPI):
periodic_report_task = asyncio.create_task(PeriodicReportWorker.run_forever())
topic_settlement_task = asyncio.create_task(TopicSettlementWorker.run_forever())
agent_batch_task = asyncio.create_task(AgentBatchTestWorker.run_forever())
human_attention_task = asyncio.create_task(HumanAttentionWorker.run_forever())
try:
yield
finally:
for task in (maintenance_task, periodic_report_task, topic_settlement_task, agent_batch_task):
for task in (maintenance_task, periodic_report_task, topic_settlement_task, agent_batch_task, human_attention_task):
task.cancel()
for task in (maintenance_task, periodic_report_task, topic_settlement_task, agent_batch_task):
for task in (maintenance_task, periodic_report_task, topic_settlement_task, agent_batch_task, human_attention_task):
try:
await task
except asyncio.CancelledError: