Fix worker crash by adding activity executor
Build Agents Runtime / build (push) Successful in 4m31s
Details
Build Agents Runtime / build (push) Successful in 4m31s
Details
This commit is contained in:
parent
8dbdce6feb
commit
7c3ad4447b
|
|
@ -4,6 +4,8 @@ from temporalio.worker import Worker
|
||||||
from src.orchestrator import CentralOrchestratorWorkflow
|
from src.orchestrator import CentralOrchestratorWorkflow
|
||||||
from src.agent import run_agent_activity
|
from src.agent import run_agent_activity
|
||||||
|
|
||||||
|
import concurrent.futures
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
client = await Client.connect("temporal-frontend.ai-core.svc.cluster.local:7233")
|
client = await Client.connect("temporal-frontend.ai-core.svc.cluster.local:7233")
|
||||||
worker = Worker(
|
worker = Worker(
|
||||||
|
|
@ -11,6 +13,7 @@ async def main():
|
||||||
task_queue="agents-orchestrator",
|
task_queue="agents-orchestrator",
|
||||||
workflows=[CentralOrchestratorWorkflow],
|
workflows=[CentralOrchestratorWorkflow],
|
||||||
activities=[run_agent_activity],
|
activities=[run_agent_activity],
|
||||||
|
activity_executor=concurrent.futures.ThreadPoolExecutor(max_workers=10),
|
||||||
)
|
)
|
||||||
print("Starting worker...")
|
print("Starting worker...")
|
||||||
await worker.run()
|
await worker.run()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue