Skip to content

[14.0] queue_job: triggers stored computed fields before calling 'set_done()' - #637

Merged
OCA-git-bot merged 1 commit into
OCA:14.0from
camptocamp:14-queue_job-fix-exec_time
Mar 27, 2024
Merged

[14.0] queue_job: triggers stored computed fields before calling 'set_done()'#637
OCA-git-bot merged 1 commit into
OCA:14.0from
camptocamp:14-queue_job-fix-exec_time

Conversation

@sebalix

@sebalixsebalix commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

So the time required to compute such fields by the ORM is taken into account when the date_done and exec_time values are set on the job.

Before: the execution time was reporting only the time taken by the delayed method itself. Time needed for stored computed fields triggered by the call to flush() wasn't included.

After: take into account all the time (delayed method + extra work of the ORM) in the execution time.

Without this change, the execution time is misleading and doesn't help to know if a job is (or became) slow.

cc @simahawk

So the time required to compute such fields by the ORM is taken into
account when the 'date_done' and 'exec_time' values are set on the job.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @guewen,
some modules you are maintaining are being modified, check this out!

@guewenguewen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch!

@simahawksimahawk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch, indeed! 🙏

@simahawk

Copy link
Copy Markdown
Contributor

/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-637-by-simahawk-bump-patch, awaiting test results.

@simahawk

Copy link
Copy Markdown
Contributor

Can you fwd port pls? 👼

@OCA-git-bot
OCA-git-bot merged commit da14343 into OCA:14.0Mar 27, 2024
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

Sign up for freeto 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

@sebalix@OCA-git-bot@simahawk@guewen