Commit Graph

10 Commits (cbc97f0bc05af621a04c573e28726c7faae3b58d)

Author SHA1 Message Date
Christoph Fiehe bc2a3830e2 Fixes the issue "PGSessionStore.vacuum() got an unexpected keyword argument 'max_lifetime'" when autovacuum gets executed.
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
2024-09-17 15:51:09 +02:00
Stéphane Bidoul 41264b9b6f session_db: refactor retry handling 2024-09-17 15:51:09 +02:00
Stéphane Bidoul 6c241ead8b session_db: reconnect if needed
If the connection to the database fails when
retrying a session operation, we end up
with no cursore, which makes subsequent
session operations fail.

We fix this by ensuring we have cursor
before any operations.
2024-09-17 15:51:09 +02:00
Stéphane Bidoul 69868a84eb session_db: improve cursor release 2024-09-17 15:51:09 +02:00
Stéphane Bidoul 71352e0496 session_db: cosmetics 2024-09-17 15:51:09 +02:00
Stéphane Bidoul 182d44f26c session_db: gevent and thread support
There were concurrency issues in evented mode.
So while I was at it, I added support for threaded mode too.
2024-09-17 15:51:09 +02:00
Stéphane Bidoul d49c69102f session_db: improve resiliency to database errors
Retry on OperationalError exception, which we receive on database restart.
Return cursor to pool when reconnecting.
2024-09-17 15:51:09 +02:00
Stéphane Bidoul 5109801f80 session_db: do not update write_date on get
The upstream FilesystemSessionStore does not do that.
2024-09-17 15:51:09 +02:00
Stéphane Bidoul 87be2eca29 session_db: use SESSION_LIFETIME constant 2024-09-17 15:51:09 +02:00
Stéphane Bidoul c53859a3c3 [MIG] session_db to 16.0 2024-09-17 15:51:09 +02:00