Merge PR #2697 into 16.0

Signed-off-by sbidoul
pull/2710/head
OCA-git-bot 2023-09-01 07:45:46 +00:00
commit 8cb6f2c1b4
1 changed files with 2 additions and 2 deletions

View File

@ -142,11 +142,11 @@ class PGSessionStore(sessions.SessionStore):
@with_lock @with_lock
@with_cursor @with_cursor
def vacuum(self): def vacuum(self, max_lifetime=http.SESSION_LIFETIME):
self._cr.execute( self._cr.execute(
"DELETE FROM http_sessions " "DELETE FROM http_sessions "
"WHERE now() at time zone 'UTC' - write_date > %s", "WHERE now() at time zone 'UTC' - write_date > %s",
(f"{http.SESSION_LIFETIME} seconds",), (f"{max_lifetime} seconds",),
) )