camptocamp/odoo-cloud-platform

[14.0] sessions_redis: inactivity timer

JevinD opened this issue · 4 comments

issue
When setting ODOO_SESSION_REDIS_EXPIRATION to 3600. This seems to timeout the user after 1 hour active or not.

Is there a way to start this timer after 1 hour of inactivity?

Currently session sliding is not supported/implemented.

I assume this would have to be implemented in the get() function. As by activity we can most likely define it by each time the session key is requested.
A simple call to self.redis.expire(key, expiration) just after we checked the session is valid might do the trick.
Around https://github.com/camptocamp/odoo-cloud-platform/blob/13.0/session_redis/session.py#L85

However while using an existing session does not reset the expiration, a new session is provided.

@yvaucher Thank you

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.