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

new afterTransaction hook #2582

Open
roggervalf opened this issue Jan 12, 2024 · 0 comments
Open

new afterTransaction hook #2582

roggervalf opened this issue Jan 12, 2024 · 0 comments

Comments

@roggervalf
Copy link
Contributor

it could be great to have a hook to run some async functions only when a transaction succeeds as in a rollback we could not want some methods to be done. A workaround is runAfterTransaction method as described in https://gregberge.com/blog/knex-transactions. The downside of it is that when we await a transaction operation, it doesn't wait for the runAfterTransaction operation, those are going to happen sometime after awaiting the main transaction.

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

No branches or pull requests

1 participant