Merge dev to main: Security improvements and comprehensive test infrastructure #39
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user