-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support prepending callbacks #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your pull request! I have only one concern (see below).
And eager to learn more about your use case!
Here's a short explanation:
Our initial benchmarks shows that this implementation holds promise:
|
Wow, that's a cool use case, thanks for sharing! |
Released in 1.4.0, please enjoy! |
Pass
prepend: true
to put the callback at the head of the callback chain.In our application's case, the
after_commit
callback:foo
was specified on a model, an instance of which is modified inside the transaction. We want our custom callback - registered later - to be executed before:foo
kudos @A1090 for the heavy lifting 🏋🏻