Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0] mail_notification_clean_status_error: remove notifications in error #1340

Merged

Conversation

sebalix
Copy link
Contributor

@sebalix sebalix commented Mar 25, 2024

Delete email notifications in error.

The scheduled action Notification: Delete Notifications older than 6 Month provided by Odoo is responsible to delete notifications that have been sent successfully.

However, it doesn't delete the notifications that could not be sent, and their number could keep growing over time, impacting the performance of some queries related to the chatter.

This module extends the scheduled action of Odoo to also delete such notifications.

On a DB with 20M+ of mail_message records and 100k notifications in error over 1M+, this allows to speed up the loading of the Discuss app widget (top bar) and the chatter of records from ~35s to ~1s.

Ref. 4352

@sebalix sebalix force-pushed the 14-add-mail_notification_clean_status_error branch 2 times, most recently from e2644ac to ddb961a Compare March 25, 2024 15:53
Copy link
Member

@hbrunn hbrunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have a test for this though

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests required 😉

mail_notification_clean_status_error/__manifest__.py Outdated Show resolved Hide resolved
@sebalix sebalix force-pushed the 14-add-mail_notification_clean_status_error branch 2 times, most recently from ec71057 to 331e42d Compare March 26, 2024 16:51
@sebalix sebalix force-pushed the 14-add-mail_notification_clean_status_error branch from 331e42d to 7aebb57 Compare March 27, 2024 09:05
@sebalix
Copy link
Contributor Author

sebalix commented Mar 27, 2024

@hbrunn @simahawk test added

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@hbrunn
Copy link
Member

hbrunn commented Apr 1, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-1340-by-hbrunn-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit b20221f into OCA:14.0 Apr 1, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at d252eb9. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants