mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 15:09:46 +08:00
refactor: unify workflow runtime boundary
This commit is contained in:
@@ -14,9 +14,9 @@ from app.application.workflow import (
|
||||
WorkflowDefinitionCommand,
|
||||
WorkflowMutationCommand,
|
||||
WorkflowQueryService,
|
||||
get_workflow_manager,
|
||||
)
|
||||
from app.runtime.config import global_vars
|
||||
from app.workflow import WorkFlowManager
|
||||
from app.startup.composition.context import HostRuntime
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ def get_workflow_mutation_command(
|
||||
) -> WorkflowMutationCommand:
|
||||
"""组装请求级工作流写用例和提交后的调度副作用。"""
|
||||
scheduler = Scheduler()
|
||||
workflow_manager = WorkFlowManager()
|
||||
workflow_manager = get_workflow_manager()
|
||||
system_config = cast(WorkflowCachePort, runtime.workflow.system_config())
|
||||
return WorkflowMutationCommand(
|
||||
repository=runtime.workflow.repository(db),
|
||||
|
||||
@@ -13,10 +13,10 @@ from app.application.workflow import (
|
||||
WorkflowDefinitionCommand,
|
||||
WorkflowMutationCommand,
|
||||
WorkflowQueryService,
|
||||
get_workflow_manager,
|
||||
)
|
||||
from app.chain.workflow import WorkflowChain
|
||||
from app.application.plugin.runtime import get_plugin_manager as PluginManager
|
||||
from app.workflow import WorkFlowManager
|
||||
from app.api.dependencies.auth import (
|
||||
get_current_active_manage_user,
|
||||
get_current_active_manage_user_async,
|
||||
@@ -78,7 +78,7 @@ async def list_actions(_: Any = Depends(get_current_active_manage_user_async)) -
|
||||
"""
|
||||
获取所有动作
|
||||
"""
|
||||
return WorkFlowManager().list_actions()
|
||||
return get_workflow_manager().list_actions()
|
||||
|
||||
|
||||
@router.get(
|
||||
|
||||
Reference in New Issue
Block a user