diff --git a/autogpt_platform/backend/backend/api/features/chat/routes.py b/autogpt_platform/backend/backend/api/features/chat/routes.py index 6b1889bf97..9252337538 100644 --- a/autogpt_platform/backend/backend/api/features/chat/routes.py +++ b/autogpt_platform/backend/backend/api/features/chat/routes.py @@ -434,9 +434,7 @@ async def resume_session_stream( try: while True: try: - chunk = await asyncio.wait_for( - subscriber_queue.get(), timeout=30.0 - ) + chunk = await asyncio.wait_for(subscriber_queue.get(), timeout=30.0) yield chunk.to_sse() if isinstance(chunk, StreamFinish): @@ -446,9 +444,7 @@ async def resume_session_stream( except GeneratorExit: pass except Exception as e: - logger.error( - f"Error in resume stream for session {session_id}: {e}" - ) + logger.error(f"Error in resume stream for session {session_id}: {e}") finally: try: await stream_registry.unsubscribe_from_task( diff --git a/autogpt_platform/backend/backend/data/execution_queue_test.py b/autogpt_platform/backend/backend/data/execution_queue_test.py index ffe0fb265b..7a76adfe05 100644 --- a/autogpt_platform/backend/backend/data/execution_queue_test.py +++ b/autogpt_platform/backend/backend/data/execution_queue_test.py @@ -3,8 +3,6 @@ import queue import threading -import pytest - from backend.data.execution import ExecutionQueue