feat(server): add workbench API, DSH planner worker and RAG pipeline
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user