feat: add persisted batch text testing
This commit is contained in:
@@ -27,6 +27,10 @@ from db.session import sync_default_tools, sync_interface_definitions
|
||||
from services.knowledge import recover_interrupted_documents
|
||||
from services.post_call.worker import recover_interrupted_analyses, run_analysis_worker
|
||||
from services.webhooks.worker import recover_interrupted_webhooks, run_webhook_worker
|
||||
from services.test_runs.orchestrator import (
|
||||
recover_interrupted_test_runs,
|
||||
test_run_orchestrator,
|
||||
)
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
@@ -41,6 +45,8 @@ from routes import (
|
||||
model_registry,
|
||||
node_types,
|
||||
site_settings,
|
||||
test_cases,
|
||||
test_runs,
|
||||
tools,
|
||||
voice_webrtc,
|
||||
voice_ws,
|
||||
@@ -54,6 +60,7 @@ async def lifespan(_app: FastAPI):
|
||||
await recover_interrupted_documents()
|
||||
await recover_interrupted_analyses()
|
||||
await recover_interrupted_webhooks()
|
||||
await recover_interrupted_test_runs()
|
||||
analysis_worker = asyncio.create_task(
|
||||
run_analysis_worker(), name="post-call-analysis-worker"
|
||||
)
|
||||
@@ -68,6 +75,7 @@ async def lifespan(_app: FastAPI):
|
||||
await asyncio.gather(
|
||||
analysis_worker, webhook_worker, return_exceptions=True
|
||||
)
|
||||
await test_run_orchestrator.shutdown()
|
||||
await voice_webrtc.shutdown_active_sessions()
|
||||
|
||||
|
||||
@@ -91,6 +99,8 @@ app.include_router(mcp_servers.router)
|
||||
app.include_router(model_registry.router)
|
||||
app.include_router(node_types.router)
|
||||
app.include_router(site_settings.router)
|
||||
app.include_router(test_cases.router)
|
||||
app.include_router(test_runs.router)
|
||||
app.include_router(tools.router)
|
||||
app.include_router(voice_webrtc.router)
|
||||
app.include_router(voice_ws.router)
|
||||
|
||||
Reference in New Issue
Block a user