Files
odoo_source/addons/gamification/models
Florian Charlier 466ab1eee6 [IMP] gamification, *: imp selection of cron-updated goals
*: base

In the cron updating challenges goals, we were historically filtering
in records of users that logged in since the last update. This doesn't
work because sessions can last a long time, so users are active between
cron runs but their goals are not updated and stale reports were sent.

We temporarily fixed this in v14.0 by updating all goals for internal
users, but this can lead to unnecessary computations too, and still
misses goals of active portal users.

Instead, we are here using the `bus.presence` records to track user
activity, combining it with the session lifetime to avoid indefinitely
fetching old goals that couldn't need an update.
This works for both internal and portal users.

Note: we update stale base comments in favor of exposing bus.presence
to guide developers.

Task-3148858

closes odoo/odoo#121763

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-30 19:09:55 +02:00
..