Skip to content

connector_search_engine: improve state update wiz#189

Merged
OCA-git-bot merged 2 commits intoOCA:16.0from
camptocamp:16-recompute-now
Mar 4, 2026
Merged

connector_search_engine: improve state update wiz#189
OCA-git-bot merged 2 commits intoOCA:16.0from
camptocamp:16-recompute-now

Conversation

@simahawk
Copy link
Copy Markdown
Contributor

Allow to schedule jobs right away instead of waiting for the cron to pass by.

Copy link
Copy Markdown
Member

@bealdav bealdav left a comment

Choose a reason for hiding this comment

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

Nice feature, thanks a lot.

LGTM on the code side

Comment thread connector_search_engine/wizards/se_binding_state_updater.py Outdated
@simahawk simahawk force-pushed the 16-recompute-now branch 2 times, most recently from bcfc380 to 2d391aa Compare February 26, 2024 10:45
@cyrilmanuel
Copy link
Copy Markdown

Hi @lmignon is it good for you ?

Copy link
Copy Markdown
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

@simahawk 2 little comments but LGTM. Thank you for this improvement.


def _jobify_batch_recompute(self, force_export: bool = False) -> None:
def _jobify_batch_recompute(
self, force_export: bool = False, binding_ids: list | None = None
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.

Suggested change
self, force_export: bool = False, binding_ids: list | None = None
self, force_export: bool = False, binding_ids: list[int] | None = None


def batch_recompute(self, force_export: bool = False) -> None:
def batch_recompute(
self, force_export: bool = False, binding_ids: list | None = None
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.

Suggested change
self, force_export: bool = False, binding_ids: list | None = None
self, force_export: bool = False, binding_ids: list[int] | None = None


def batch_recompute(self, force_export: bool = False) -> None:
def batch_recompute(
self, force_export: bool = False, binding_ids: list | None = None
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.

What do you think about doing another method? (batch_recompute_bindings_ids?), and factoring out the common part. Less if's is good, in general.

self.with_delay(
description=description, identity_key=identity_exact
).batch_recompute(force_export)
).batch_recompute(force_export, binding_ids=binding_ids)
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.

Strictly speaking this job description is now inaccurate because it is now a partial recompute? So maybe this method should be split too?

@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 11, 2024
@lmignon lmignon added no stale Use this label to prevent the automated stale action from closing this PR/Issue. and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Aug 26, 2024
@sebastienbeau sebastienbeau added this to the 16.0 milestone Jun 3, 2025
@lmignon
Copy link
Copy Markdown
Contributor

lmignon commented Feb 9, 2026

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-189-by-lmignon-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Feb 9, 2026
Signed-off-by lmignon
@OCA-git-bot
Copy link
Copy Markdown
Contributor

@lmignon your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-189-by-lmignon-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

_jobify_batch_recompute and batch_recompute now accept a binding_ids param

to force the records to be computed.
@cyrilmanuel
Copy link
Copy Markdown

hi @lmignon, i update the code with your comment and i rebase the branch. could you redo the merge please :)
thanks a lot

@lmignon
Copy link
Copy Markdown
Contributor

lmignon commented Mar 4, 2026

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-189-by-lmignon-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f11c233 into OCA:16.0 Mar 4, 2026
5 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

Labels

approved merged 🎉 no stale Use this label to prevent the automated stale action from closing this PR/Issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants