feat(server): add workbench API, DSH planner worker and RAG pipeline

This commit is contained in:
yi
2026-09-16 19:06:20 +08:00
parent 72fc5b47c7
commit d4b5b3f43a
122 changed files with 31906 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
"""Execution backend selection.
inline: legacy mode; FastAPI spawns a local background thread.
dsh: workbench only creates CampaignRun/TaskQueueItem rows; an external DSH (default)
worker leases and executes the content production pipeline.
"""
from __future__ import annotations
import os
def execution_backend() -> str:
value = os.getenv("YAWAN_EXECUTION_BACKEND", "dsh").strip().lower()
return "dsh" if value == "dsh" else "inline"
def is_dsh_backend() -> bool:
return execution_backend() == "dsh"