Skip to content

Commit

Permalink
chore: Log last_login timeout with logger.warn
Browse files Browse the repository at this point in the history
  • Loading branch information
maerteijn committed Dec 18, 2024
1 parent 7fea3de commit 70b0b97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion label_studio/core/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def process_request(self, request) -> None:
# Check if this request is too far from when the login happened,
# but only when last_login was set before
if last_login and (current_time - last_login) > settings.MAX_SESSION_AGE:
logger.info(
logger.warn(
f'Request is too far from last login {current_time - last_login:.0f} > {settings.MAX_SESSION_AGE}; logout'
)
logout(request)
Expand Down

0 comments on commit 70b0b97

Please sign in to comment.