Skip to content
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

fix: add max limit of 5 consecutive scheduled syncs #3639

Draft
wants to merge 1 commit into
base: release
Choose a base branch
from

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Dec 18, 2024

All Submissions:

Changes proposed in this Pull Request:

Adds a mechanism to the schedule_sync method so that consecutive scheduled syncs for a single contact will only happen up to a max of five consecutive times. This is to avoid an infinite loop if a contact is scheduled to retry the sync after a failure, but the sync keeps failing.

The counter is reset upon a successful sync to the ESP.

How to test the changes in this Pull Request:

Follow instructions in Automattic/newspack-newsletters#1729.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo added the [Status] Needs Review The issue or pull request needs to be reviewed label Dec 18, 2024
@dkoo dkoo self-assigned this Dec 18, 2024
@dkoo dkoo requested a review from a team as a code owner December 18, 2024 22:51
@dkoo dkoo marked this pull request as draft December 20, 2024 20:04
@dkoo
Copy link
Contributor Author

dkoo commented Dec 20, 2024

Since we're coming right up against the holidays at this point, we're going to hold this change for when the team is back at full strength.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The issue or pull request needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant