mirror of https://github.com/langgenius/dify.git
refactor(graph_engine): rename SimpleWorkerPool to WorkerPool
This commit is contained in:
parent
226f14a20f
commit
4d63bd2083
|
|
@ -39,7 +39,7 @@ from .orchestration import Dispatcher, ExecutionCoordinator
|
|||
from .protocols.command_channel import CommandChannel
|
||||
from .response_coordinator import ResponseStreamCoordinator
|
||||
from .state_management import UnifiedStateManager
|
||||
from .worker_management import SimpleWorkerPool
|
||||
from .worker_management import WorkerPool
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ class GraphEngine:
|
|||
context_vars = contextvars.copy_context()
|
||||
|
||||
# Create worker pool for parallel node execution
|
||||
self._worker_pool = SimpleWorkerPool(
|
||||
self._worker_pool = WorkerPool(
|
||||
ready_queue=self._ready_queue,
|
||||
event_queue=self._event_queue,
|
||||
graph=self._graph,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from ..command_processing import CommandProcessor
|
|||
from ..domain import GraphExecution
|
||||
from ..event_management import EventManager
|
||||
from ..state_management import UnifiedStateManager
|
||||
from ..worker_management import SimpleWorkerPool
|
||||
from ..worker_management import WorkerPool
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..event_management import EventHandler
|
||||
|
|
@ -30,7 +30,7 @@ class ExecutionCoordinator:
|
|||
event_handler: "EventHandler",
|
||||
event_collector: EventManager,
|
||||
command_processor: CommandProcessor,
|
||||
worker_pool: SimpleWorkerPool,
|
||||
worker_pool: WorkerPool,
|
||||
) -> None:
|
||||
"""
|
||||
Initialize the execution coordinator.
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ This package manages the worker pool, including creation,
|
|||
scaling, and activity tracking.
|
||||
"""
|
||||
|
||||
from .simple_worker_pool import SimpleWorkerPool
|
||||
from .worker_pool import WorkerPool
|
||||
|
||||
__all__ = [
|
||||
"SimpleWorkerPool",
|
||||
"WorkerPool",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ if TYPE_CHECKING:
|
|||
|
||||
|
||||
@final
|
||||
class SimpleWorkerPool:
|
||||
class WorkerPool:
|
||||
"""
|
||||
Simple worker pool with integrated management.
|
||||
|
||||
Loading…
Reference in New Issue