fix: 修复了逻辑
This commit is contained in:
parent
0ee8139902
commit
71ede0ac69
10
main.py
10
main.py
|
|
@ -1,6 +1,6 @@
|
|||
import asyncio
|
||||
import ray
|
||||
|
||||
from pretor.worker_individual.worker_cluster import WorkerCluster
|
||||
from pretor.utils.banner import print_banner
|
||||
from pretor.core.database.postgres import PostgresDatabase
|
||||
from pretor.core.global_state_machine.global_state_machine import GlobalStateMachine
|
||||
|
|
@ -56,6 +56,14 @@ async def start_system():
|
|||
consciousness_node = ConsciousnessNode.options(name='consciousness_node').remote()
|
||||
control_node = ControlNode.options(name='control_node').remote()
|
||||
|
||||
try:
|
||||
worker_cluster_actor = WorkerCluster.options(
|
||||
name="worker_cluster",
|
||||
lifetime="detached" # 保证它在后台一直运行
|
||||
).remote()
|
||||
print("✅ WorkerCluster 已成功启动并注册!")
|
||||
except ValueError:
|
||||
print("WorkerCluster 已经存在。")
|
||||
# 5. 启动工作流运行引擎
|
||||
workflow_engine = WorkflowRunningEngine.options(name='workflow_running_engine').remote(
|
||||
consciousness_node=consciousness_node,
|
||||
|
|
|
|||
Loading…
Reference in New Issue