Skip to content

Commit

Permalink
refactor(sessions): Rename code to util
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzWeber0 committed Dec 15, 2022
1 parent e32464b commit e093887
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/capellacollab/sessions/idletimeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from capellacollab.config import config
from capellacollab.core import database
from capellacollab.sessions import core
from capellacollab.sessions import util
from capellacollab.sessions.crud import get_session_by_id
from capellacollab.sessions.operators import OPERATOR

Expand All @@ -34,7 +34,7 @@ def terminate_idle_session():
log.info("Terminating idle session %s", session_id)
with database.SessionLocal() as db:
if session := get_session_by_id(db, session_id):
core.terminate_session(session, db, OPERATOR)
util.terminate_session(session, db, OPERATOR)
else:
log.error(
"Session was not found in our database. Terminating idle session %s",
Expand Down
4 changes: 2 additions & 2 deletions backend/capellacollab/sessions/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
from capellacollab.users.injectables import get_own_user
from capellacollab.users.models import DatabaseUser, Role

from . import core
from . import util
from .injectables import get_existing_session

router = APIRouter(
Expand Down Expand Up @@ -359,7 +359,7 @@ def end_session(
db: Session = Depends(get_db),
operator: KubernetesOperator = Depends(get_operator),
):
core.terminate_session(db, session, operator)
util.terminate_session(db, session, operator)


@router.post(
Expand Down
File renamed without changes.

0 comments on commit e093887

Please sign in to comment.