connector_search_engine: improve state update wiz#189
Conversation
bealdav
left a comment
There was a problem hiding this comment.
Nice feature, thanks a lot.
LGTM on the code side
bcfc380 to
2d391aa
Compare
2d391aa to
81f8e3c
Compare
|
Hi @lmignon is it good for you ? |
|
|
||
| def _jobify_batch_recompute(self, force_export: bool = False) -> None: | ||
| def _jobify_batch_recompute( | ||
| self, force_export: bool = False, binding_ids: list | None = None |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Strictly speaking this job description is now inaccurate because it is now a partial recompute? So maybe this method should be split too?
|
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. |
|
/ocabot merge patch |
|
What a great day to merge this nice PR. Let's do it! |
|
@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.
81f8e3c to
80a01bc
Compare
|
hi @lmignon, i update the code with your comment and i rebase the branch. could you redo the merge please :) |
|
/ocabot merge patch |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at 5d1b1e0. Thanks a lot for contributing to OCA. ❤️ |
Allow to schedule jobs right away instead of waiting for the cron to pass by.