Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Scheduler] Save checkpoint in a finally block#52307

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:6.3fromFrancoisPog:fix_52288
Oct 27, 2023

Conversation

@FrancoisPog
Copy link
Contributor

@FrancoisPogFrancoisPog commentedOct 26, 2023
edited
Loading

QA
Branch?6.3
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#52288
LicenseMIT

As described in the linked issue :

The message generator appears to store stateful data by loading and saving the checkpoint with the cache.

But if the worker is configured to stop after X message(s), once the last message is handled, the (messenger) worker will break its loop and stop. In this case, the execution stop and the stateful data of the message (time of last execution for example) will not be saved.

So when the consumer restarts it will re-handle the message because the last execution was not stored.

So the solution here is to put the code that save the checkpoint in afinally block.
Thanksmaelanleborgne.

valtzu reacted with thumbs up emoji
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@FrancoisPogFrancoisPog changed the titleSave checkpoint in a finally block[Scheduler] Save checkpoint in a finally blockOct 26, 2023
@stof
Copy link
Member

Please add a test preventing regressions.

FrancoisPog reacted with thumbs up emoji

@FrancoisPogFrancoisPogforce-pushed thefix_52288 branch 2 times, most recently frome6148f1 to1cc4165CompareOctober 26, 2023 15:21
@fabpot
Copy link
Member

Thank you@FrancoisPog.

@fabpotfabpot merged commit798a36a intosymfony:6.3Oct 27, 2023
@Jeroeny
Copy link
Contributor

You might be interested to know that a checkpoint resets anyway after another process takes over:#52039

This was referencedOct 29, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@fabpotfabpotfabpot approved these changes

@kbondkbondAwaiting requested review from kbondkbond is a code owner

+1 more reviewer

@maelanleborgnemaelanleborgnemaelanleborgne left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

7 participants

@FrancoisPog@carsonbot@stof@fabpot@Jeroeny@OskarStark@maelanleborgne

[8]ページ先頭

©2009-2025 Movatter.jp