Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add extra logging around session store" #1248

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading