Fix remove dead code (#6249)

This commit is contained in:
tofarr
2025-01-13 14:15:13 -07:00
committed by GitHub
parent 6d015a5dca
commit 01ac207b92
2 changed files with 3 additions and 12 deletions

View File

@@ -15,7 +15,6 @@ from openhands.events.observation.agent import AgentStateChangedObservation
from openhands.events.serialization import event_to_dict
from openhands.events.stream import AsyncEventStreamWrapper
from openhands.server.routes.settings import ConversationStoreImpl, SettingsStoreImpl
from openhands.server.session.manager import ConversationDoesNotExistError
from openhands.server.shared import config, openhands_config, session_manager, sio
from openhands.server.types import AppMode
@@ -61,13 +60,9 @@ async def connect(connection_id: str, environ, auth):
'Settings not found', {'msg_id': 'CONFIGURATION$SETTINGS_NOT_FOUND'}
)
try:
event_stream = await session_manager.join_conversation(
conversation_id, connection_id, settings, user_id
)
except ConversationDoesNotExistError:
logger.error(f'Conversation {conversation_id} does not exist')
raise ConnectionRefusedError(f'Conversation {conversation_id} does not exist')
event_stream = await session_manager.join_conversation(
conversation_id, connection_id, settings, user_id
)
agent_state_changed = None
async_stream = AsyncEventStreamWrapper(event_stream, latest_event_id + 1)

View File

@@ -24,10 +24,6 @@ _CLEANUP_INTERVAL = 15
_CLEANUP_EXCEPTION_WAIT_TIME = 15
class ConversationDoesNotExistError(Exception):
pass
@dataclass
class _SessionIsRunningCheck:
request_id: str