Skip to content

[14.0] mail_notification_clean_status_error: remove notifications in error#1340

Merged
OCA-git-bot merged 1 commit intoOCA:14.0from
camptocamp:14-add-mail_notification_clean_status_error
Apr 1, 2024
Merged

[14.0] mail_notification_clean_status_error: remove notifications in error#1340
OCA-git-bot merged 1 commit intoOCA:14.0from
camptocamp:14-add-mail_notification_clean_status_error

Conversation

@sebalix
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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 😉

Comment thread mail_notification_clean_status_error/__manifest__.py Outdated
@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
Copy Markdown
Contributor Author

sebalix commented Mar 27, 2024

@hbrunn @simahawk test added

@OCA-git-bot
Copy link
Copy Markdown
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
Copy Markdown
Member

hbrunn commented Apr 1, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
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
@OCA-git-bot
Copy link
Copy Markdown
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