Daily updates from Odoo
Thursday, August 1, 2024
1 change · saas-17.2
Enhancements to existing features
User availability is now updated only when it actually changes or when a websocket disconnects, instead of refreshing every minute. This lowers server load while keeping chat and presence statuses accurate across devices.
Original PR description
*: hr_holidays, mail. Before this PR, the main tab updated the user presence every minute. As a result of this update, it would also receive the IM statuses it was interested in. However, this approach puts significant pressure on the gevent worker, especially when it handles more databases than the registry can hold. To address this issue, this PR improves the way presences are updated: - Presences are sent and broadcasted when they change (e.g. away => online). - When a websocket disconnects, the user is considered disconnected. If other devices receive this notification, they will update the user presence immediately. These changes greatly reduce traffic caused by presence updates while keeping the IM statuses reliable.