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

[FIX][14.0] pricelist_cache: change root pricelist job execution #2424

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from

Conversation

TDu
Copy link
Member

@TDu TDu commented Mar 21, 2023

Root pricelist take a long time to compute.
So execute computation one by one.

pricelist_id,
]
)
# Spawn a job every 3 oter pricelists (reduce the number of jobs created)
Copy link
Member

Choose a reason for hiding this comment

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

🦦

# Spawn a job every 3 pricelists (reduce the number of jobs created)
# pricelists = self.env["product.pricelist"].search([])
pricelists_root = self.env["product.pricelist"]._get_root_pricelist_ids()
pricelist_ids = [plid for plid in pricelist_ids if plid not in pricelists_root]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pricelist_ids = [plid for plid in pricelist_ids if plid not in pricelists_root]
pricelist_ids = self.env["product.pricelist"].search([("id", "not in", pricelist_root)])

and remove line 194, maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated see fixup

@TDu TDu force-pushed the pcache-job-fix branch 3 times, most recently from 4c03632 to 27ca4e0 Compare March 21, 2023 14:49
Root pricelist take a long time to compute.
So execute computation one by one.
@dreispt
Copy link
Sponsor Member

dreispt commented May 18, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

@dreispt The merge process could not start, because command `git merge --no-ff -m 'Merge PR #2424 into 14.0

Signed-off-by dreispt' tmp-pr-2424` failed with output:

Auto-merging pricelist_cache/models/product_pricelist_cache.py
CONFLICT (content): Merge conflict in pricelist_cache/models/product_pricelist_cache.py
Auto-merging pricelist_cache/models/product_pricelist.py
CONFLICT (content): Merge conflict in pricelist_cache/models/product_pricelist.py
Automatic merge failed; fix conflicts and then commit the result.

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

Successfully merging this pull request may close these issues.

None yet

4 participants