Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] base: restrict _gc_sessions to a single database
Background ========= Previously, _gc_sessions ran for all databases regardless of the active one. This could cause problems in SaaS environments with shared session storage across databases. Change ====== We propose introducing a limitation within the _gc_sessions method. The method will now check for the presence of the ODOO_SKIP_GC_SESSIONS environment variable. If set, it skips the cleanup process. This behavior is typically desired in environments launched without a specified database. On the other hand, if the environment variable is not set, the method will likely assume a non-SaaS environment (e.g., on-premise or development) and continue with the regular cleanup process. Impact ===== Ensures isolated session management for individual databases in SaaS environments. Maintains automatic cleanup for developers and on-premise users. task-3716956 closes odoo#152880 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
- Loading branch information