Skip to content

Conversation

@simahawk
Copy link
Contributor

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

Copy link
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

@simahawk simahawk force-pushed the 16-recompute-now branch 2 times, most recently from bcfc380 to 2d391aa Compare February 26, 2024 10:45
_jobify_batch_recompute and batch_recompute now accept a binding_ids param

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

Hi @lmignon is it good for you ?

Copy link
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
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
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
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
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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 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