Skip to content
Snippets Groups Projects
Commit 03e25484 authored by snd's avatar snd Committed by Nicolas Martinelli
Browse files

[FIX] google_calendar: synchronization cron timeout


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>
parent be06eb47
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment