refactor: unify workflow runtime boundary

This commit is contained in:
jxxghp
2026-08-24 03:43:47 +08:00
parent 371383f0a8
commit 9f76fc9dec
12 changed files with 154 additions and 34 deletions
+2 -2
View File
@@ -17,6 +17,7 @@ from pydantic import BaseModel
from app.chain import ChainBase
from app.runtime.config import global_vars
from app.runtime.events import Event, eventmanager
from app.application.workflow import get_workflow_manager
from app.application.chain.data import WorkflowPortProxy as WorkflowOper
from app.runtime.log import logger
from app.schemas.workflow import ActionContext
@@ -25,7 +26,6 @@ from app.schemas.workflow import Action
from app.schemas.workflow import ActionExecution
from app.schemas.workflow import ActionResult
from app.schemas.types import EventType
from app.workflow import WorkFlowManager
ARTIFACT_FIELDS = {"torrents", "medias", "fileitems", "downloads", "sites", "subscribes"}
DEFAULT_WORKFLOW_MAX_WORKERS = 4
@@ -162,7 +162,7 @@ class WorkflowExecutor:
self.flow_failed = set()
# 工作流管理器
self.workflowmanager = WorkFlowManager()
self.workflowmanager = get_workflow_manager()
# 线程安全队列
self.queue = deque()
self.queued_actions = set()