Skip to content

Conversation

@guewen
Copy link
Member

@guewen guewen commented Feb 1, 2021

Everytime a job is created, a mail.message "Queue Job created" is
created. This is useless, as we already have the creation date and user,
and nobody will ever want to receive a notification for a created job
anyway.

Removing the auto-subscription of the user that created the job makes
sense as well since we automatically subscribe the queue job managers
for failures, and we don't send other notifications.

It allows to remove a lot of insertions of records (and of deletions
when autovacuuming jobs).

Rough benchmark when generating jobs for ddmrp buffers (it includes some base
time to fetch the ddmrp buffers too). 9191 jobs were created:

executed with duration
no optimizations 2m18s
create optimization (#305) 1m41s
mail.message/follower optimization (current PR) 1m11s
both optimizations 35s

@guewen guewen force-pushed the 13.0-no-initial-mail-follower branch from f2de0b9 to c00b931 Compare February 1, 2021 09:45
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.

makes sense

@guewen guewen force-pushed the 13.0-no-initial-mail-follower branch from c00b931 to 4c2a24a Compare February 1, 2021 10:43
@guewen guewen changed the title [13.0] Remove initial create notification and follower [13.0] Remove initial create notification Feb 1, 2021
@guewen guewen force-pushed the 13.0-no-initial-mail-follower branch from 4c2a24a to b430450 Compare February 1, 2021 10:54
@guewen guewen changed the title [13.0] Remove initial create notification [13.0] Remove initial create notification and follower Feb 1, 2021
@guewen guewen force-pushed the 13.0-no-initial-mail-follower branch from b430450 to b8b344d Compare February 1, 2021 11:21
Everytime a job is created, a mail.message "Queue Job created" is
created. This is useless, as we already have the creation date and user,
and nobody will ever want to receive a notification for a created job
anyway.

Removing the on creation auto-subscription of the user that created the
job makes sense as well since we automatically subscribe the queue job
managers for failures. Add the owner of the jobs to the followers on
failures only as well.

It allows to remove a lot of insertions of records (and of deletions
when autovacuuming jobs).
@guewen guewen force-pushed the 13.0-no-initial-mail-follower branch from b8b344d to 510dc4f Compare February 1, 2021 11:22
@guewen
Copy link
Member Author

guewen commented Feb 3, 2021

Added a small benchmark in the description

@simahawk
Copy link
Contributor

simahawk commented Feb 4, 2021

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 13.0-ocabot-merge-pr-302-by-simahawk-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 1245cfd into OCA:13.0 Feb 4, 2021
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 563db61. 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.

6 participants