Skip to content

[Scheduler] Add capability to skip missed periodic tasks, only the last schedule will be called #58001

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

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

eltharin
Copy link
Contributor

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #57858
License MIT

Allow a Schedule to run only once reccuring messages when a worker break (with stateful enalbed)

@eltharin eltharin requested a review from kbond as a code owner August 13, 2024 15:22
@carsonbot carsonbot added this to the 7.2 milestone Aug 13, 2024
@OskarStark OskarStark changed the title scheduler - add capability to launch only once late message add capability to launch only once late message Aug 13, 2024
@carsonbot carsonbot changed the title add capability to launch only once late message [Scheduler] add capability to launch only once late message Aug 13, 2024
@eltharin eltharin requested a review from OskarStark August 14, 2024 09:34
@eltharin eltharin changed the title [Scheduler] add capability to launch only once late message [Scheduler] Add capability to skip missed periodic tasks, only the last schedule will be called Aug 14, 2024
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

I'm wondering about the naming. This class doesn't use the set* convention, also is "heap" clear enough?
Proposals:

  • skipMissedRuns(bool) / shouldSkipMissedRuns(): bool
  • skipMissedTasks(bool) / shouldSkipMissedTasks(): bool

@eltharin
Copy link
Contributor Author

I agree at 99% but don't you thinkk skipMissedRuns make people think that there is not more than one?

What do you think to groupMissedRuns(bool) / shouldGroupMissedRuns(): bool

@OskarStark
Copy link
Contributor

processLastMissedRun / shouldProcessLastMissedRun

?

@fabpot fabpot force-pushed the scheduler_run_once_on_heap branch from 70076a9 to 9ae569b Compare August 19, 2024 09:11
@fabpot
Copy link
Member

fabpot commented Aug 19, 2024

Thank you @eltharin.

@fabpot fabpot merged commit 3ad4e94 into symfony:7.2 Aug 19, 2024
1 check was pending
@eltharin eltharin deleted the scheduler_run_once_on_heap branch August 19, 2024 09:18
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Aug 26, 2024
…, only the last schedule will be called (eltharin)

This PR was squashed before being merged into the 7.2 branch.

Discussion
----------

[Scheduler] Add capability to skip missed periodic tasks, only the last schedule will be called

Add documentation for my PR symfony/symfony#58001,

Commits
-------

41f1786 [Scheduler] Add capability to skip missed periodic tasks, only the last schedule will be called
@fabpot fabpot mentioned this pull request Oct 27, 2024
@ro0NL
Copy link
Contributor

ro0NL commented Oct 30, 2024

without this PR our app got nuked, twice :(

BUMP your app ASAP

this should've been a hotfix

@ro0NL
Copy link
Contributor

ro0NL commented Oct 30, 2024

i should add; without this PR you are severely prone in case of redis failure

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

Successfully merging this pull request may close these issues.

[Scheduler] Support running missed tasks only once instead of for every missed run date
7 participants