Skip to content

Commit

Permalink
Revert "Add extra logging around session store (#1245)"
Browse files Browse the repository at this point in the history
This reverts commit 9e2750e.
  • Loading branch information
MebinAbraham committed Nov 15, 2023
1 parent ef12715 commit abb69b3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
8 changes: 0 additions & 8 deletions app/authentication/authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,6 @@ def load_user(extend_session: bool = True) -> Optional[User]:

return user

if not session_store:
logger.info("session store doesn't exist") # pragma: no cover

elif not _is_session_valid(session_store):
logger.info(
"session has expired", session_expiry=session_store.expiration_time
) # pragma: no cover

logger.info("session does not exist")

cookie_session.pop(USER_IK, None)
Expand Down
13 changes: 0 additions & 13 deletions app/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ def get_questionnaire_store(user_id: str, user_ik: str) -> QuestionnaireStore:

def get_session_store() -> SessionStore | None:
if USER_IK not in cookie_session or EQ_SESSION_ID not in cookie_session:
if USER_IK not in cookie_session:
logger.info("user ik not found in cookie session") # pragma: no cover

if EQ_SESSION_ID not in cookie_session:
logger.info("eq session id not found in cookie session") # pragma: no cover

return None

# Sets up a single SessionStore instance per request context.
Expand All @@ -54,9 +48,6 @@ def get_session_store() -> SessionStore | None:
cookie_session[USER_IK], pepper, cookie_session[EQ_SESSION_ID]
)

if not store.session_data:
logger.info("session data not found") # pragma: no cover

return store if store.session_data else None


Expand All @@ -66,11 +57,7 @@ def get_session_timeout_in_seconds(schema: QuestionnaireSchema) -> int:
:return: Timeout in seconds
"""
default_session_timeout = current_app.config["EQ_SESSION_TIMEOUT_SECONDS"]
logger.info("default session timeout", timeout=default_session_timeout)

schema_session_timeout = schema.json.get("session_timeout_in_seconds")
logger.info("schema session timeout", timeout=schema_session_timeout)

timeout = (
schema_session_timeout
if schema_session_timeout and schema_session_timeout < default_session_timeout
Expand Down

0 comments on commit abb69b3

Please sign in to comment.