fix: don't await executor.start() as it's an infinite loop - create task instead
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 2m12s
Run Tests / Backend Tests (push) Failing after 6m25s
Run Tests / Frontend Tests (push) Failing after 58s
Run Tests / Test Summary (push) Failing after 15s

This commit is contained in:
Gan, Jimmy
2026-04-02 09:01:06 +08:00
parent a31000d8ad
commit a4782ecb1c
+6 -3
View File
@@ -319,13 +319,16 @@ async def get_executor() -> AgentExecutor:
async def start_executor(): async def start_executor():
"""Start the executor service""" """Start the executor service - initializes and starts the background task"""
print("start_executor() called") print("start_executor() called")
try: try:
executor = await get_executor() executor = await get_executor()
print(f"Executor obtained: {executor is not None}, running: {executor.running}") print(f"Executor obtained: {executor is not None}, running: {executor.running}")
await executor.start() # Don't await start() - it's an infinite loop!
print("Executor start() completed (should not reach here as start() is infinite loop)") # Just call it to set running=True and start the loop
# The task will be managed by the caller
asyncio.create_task(executor.start())
print("Executor background task created")
except Exception as e: except Exception as e:
print(f"ERROR in start_executor: {e}") print(f"ERROR in start_executor: {e}")
import traceback import traceback