Content-Length: 237535 | pFad | https://github.com/getlago/lago-api/pull/3010

06 fix: Ensure Plans::DestroyJob are queued only once by ancorcruz · Pull Request #3010 · getlago/lago-api · GitHub
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: Ensure Plans::DestroyJob are queued only once #3010

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

ancorcruz
Copy link
Contributor

@ancorcruz ancorcruz commented Dec 27, 2024

This change is meant to avoid issues when a user tries to delete a plan more than once. This happens because the plan deletion is performed as a background job and could take some time as all child plans must be deleted, subscriptions terminated, invoices generated and discarded, etc...

The goal of this change is to avoid failed jobs because of race conditions between multiple runs for the same plan producing unique DB index constraints errors or discard! errors as those only produce noise and waste of support time.

This change is meant to avoid issues when a user tries to delete a plan
more than once. This happens because the plan deletion is performed as a
background job and could take some time as all child plans must be
deleted, subscriptions terminated, invoices generated and discarded,
etc...
@ancorcruz ancorcruz self-assigned this Dec 27, 2024
@ancorcruz ancorcruz merged commit 59902a6 into main Dec 27, 2024
6 checks passed
@ancorcruz ancorcruz deleted the fix/concurrent_destroyjob branch December 27, 2024 15:15
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.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/getlago/lago-api/pull/3010

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy