Skip to content
Snippets Groups Projects
user avatar
snd authored
In a database with many users / events to synchronize, the cron
`ir_cron_sync_all_cals` may time out. Consequently, even if a `commit`
is performed for each user, some users are never synchronized.

In this commit, we first sort the users by last synchronization date,
meaning that all users will ultimately be synchronized, even if the cron
times out. On top of that, we introduce the context key
`last_sync_hours` to prevent the synchronization in case the cron is
restarted after timeout.

opw-2158372

closes odoo/odoo#45026

X-original-commit: 2f21def6
Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: default avatarNicolas Martinelli <nim@odoo.com>
03e25484
History
Name Last commit Last update