Skip to content

[FIX] util/pg: Add optional parameter - #476

Draft
sagu-odoo wants to merge 1 commit into
odoo:masterfrom
odoo-dev:master-add-optional-execute-sagu
Draft

[FIX] util/pg: Add optional parameter#476
sagu-odoo wants to merge 1 commit into
odoo:masterfrom
odoo-dev:master-add-optional-execute-sagu

Conversation

@sagu-odoo

@sagu-odoo sagu-odoo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

add optional parameter too run parallel
execute serial wise if needed.

@robodoo

robodoo commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@sagu-odoo
sagu-odoo force-pushed the master-add-optional-execute-sagu branch from 2c98e62 to c7bae91 Compare July 30, 2026 11:57
@sagu-odoo

Copy link
Copy Markdown
Contributor Author

@sagu-odoo
sagu-odoo force-pushed the master-add-optional-execute-sagu branch from c7bae91 to 24bdfd4 Compare July 30, 2026 12:07
Comment thread src/util/pg.py
or (odoo_module is not None and getattr(odoo_module, "current_test", False))
)

if allow_parallel:

@Pirols Pirols Jul 30, 2026

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.

I don't think you ever need a parameter for this. The _serial is sort of a fallback when we know we can't run in parallel.

EDIT: As discussed in DM it's really anti idiomatic to call parallel_execute while asking it not to run in parallel. On the caller side you can just write a for loop over exploded queries, and it is to be seen that's even better than a single bigger query.

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.

OTOH, tests for this method should then be changed to explicitly call _parallel_execute_threaded as it's the one that is actually tested.

add optional parameter too run parallel
execute in serial wise if needed ``allow_parallel``
`AUTO`
@sagu-odoo
sagu-odoo force-pushed the master-add-optional-execute-sagu branch from 24bdfd4 to af2a2bf Compare July 30, 2026 12:10
@sagu-odoo
sagu-odoo marked this pull request as draft July 30, 2026 12:22
@KangOl

KangOl commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

upgradeci retry with always only base

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.

4 participants