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 (jobs-inside-transaction): add setup for after commit everywhere and fix customer.vies_check webhook #1703

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

lovrocolic
Copy link
Collaborator

Context

Common scenario in Lago is that we have to trigger active job inside DB transaction. SInce job tries to fetch and use record that is saved inside transaction, we often end up with ActiveJob::DeserializationError if job is processed before transaction commit command.

Description

We usually handle this issue by setting wait parameter to 3 seconds upon calling active job.

This PR sets up ActiveCommitEverywhere gem so that we can handle this issue without a 3 seconds hack.

Also, as part of this PR new library is used to correctly call customer.vies_check webhook.

Copy link
Collaborator

@vincent-pochet vincent-pochet left a comment

Choose a reason for hiding this comment

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

Nice! 🚀

@lovrocolic lovrocolic merged commit a5780bc into main Feb 20, 2024
6 checks passed
@lovrocolic lovrocolic deleted the setup-for-after-commit-everywhere branch February 20, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants