From b68adf53a2d73eaf32ab9cfa2f70ef3c77eb35b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 29 Oct 2022 15:36:13 +0200 Subject: [PATCH] session_db: use SESSION_LIFETIME constant --- session_db/pg_session_store.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/session_db/pg_session_store.py b/session_db/pg_session_store.py index 05a46514b..951b67a22 100644 --- a/session_db/pg_session_store.py +++ b/session_db/pg_session_store.py @@ -106,7 +106,8 @@ class PGSessionStore(sessions.SessionStore): def vacuum(self): self._cr.execute( "DELETE FROM http_sessions " - "WHERE now() at time zone 'UTC' - write_date > '7 days'" + "WHERE now() at time zone 'UTC' - write_date > %s", + (f"{http.SESSION_LIFETIME} seconds",), )