session_db: use SESSION_LIFETIME constant
parent
6ff5bb8e03
commit
b68adf53a2
|
@ -106,7 +106,8 @@ class PGSessionStore(sessions.SessionStore):
|
||||||
def vacuum(self):
|
def vacuum(self):
|
||||||
self._cr.execute(
|
self._cr.execute(
|
||||||
"DELETE FROM http_sessions "
|
"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",),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue