mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Fix remove dead code (#6249)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -24,10 +24,6 @@ _CLEANUP_INTERVAL = 15
|
||||
_CLEANUP_EXCEPTION_WAIT_TIME = 15
|
||||
|
||||
|
||||
class ConversationDoesNotExistError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
@dataclass
|
||||
class _SessionIsRunningCheck:
|
||||
request_id: str
|
||||
|
||||
Reference in New Issue
Block a user