mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
Make logs quieter. (#13042)
This commit is contained in:
@@ -417,14 +417,12 @@ class LiveStatusAppConversationService(AppConversationServiceBase):
|
||||
conversation_info = _conversation_info_type_adapter.validate_python(data)
|
||||
conversation_info = [c for c in conversation_info if c]
|
||||
return conversation_info
|
||||
except httpx.HTTPStatusError as exc:
|
||||
# The runtime API stops idle sandboxes all the time and they return a 503.
|
||||
# This is normal and should not be logged.
|
||||
if not exc.response or exc.response.status_code != 503:
|
||||
_logger.exception(
|
||||
except httpx.HTTPStatusError:
|
||||
# The runtime API stops idle sandboxes all the time and they return a 404 or a 503.
|
||||
# This is normal and should not be considered an error.
|
||||
_logger.warning(
|
||||
f'Error getting conversation status from sandbox {sandbox.id}',
|
||||
exc_info=True,
|
||||
stack_info=True,
|
||||
)
|
||||
return []
|
||||
except Exception:
|
||||
|
||||
@@ -431,7 +431,7 @@ LOQUACIOUS_LOGGERS = [
|
||||
'socketio.client',
|
||||
'socketio.server',
|
||||
'aiosqlite',
|
||||
'alembic.runtime.plugins.setup',
|
||||
'alembic.runtime.plugins',
|
||||
]
|
||||
|
||||
for logger_name in LOQUACIOUS_LOGGERS:
|
||||
|
||||
Reference in New Issue
Block a user