Skip to content

Commit

Permalink
chore: Change idle time unavailable message if metrics not found
Browse files Browse the repository at this point in the history
"Unknown session" could be interpreted as "The session doesn't exist", but that
is not true. The session exists and only the metrics are not available.
  • Loading branch information
MoritzWeber0 committed Nov 29, 2024
1 parent bb822af commit caa5a5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/capellacollab/sessions/injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ def get_idle_state(sid: str) -> sessions_models2.IdleState:

return sessions_models2.IdleState(
available=False,
unavailable_reason="Unknown session",
unavailable_reason="No metrics found for session",
terminate_after_minutes=config.sessions.timeout,
)
2 changes: 1 addition & 1 deletion backend/tests/sessions/test_session_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_get_idle_status_unknown_session():

assert injection.get_idle_state("test") == models2_sessions.IdleState(
available=False,
unavailable_reason="Unknown session",
unavailable_reason="No metrics found for session",
terminate_after_minutes=90,
)

Expand Down

0 comments on commit caa5a5e

Please sign in to comment.