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

after_commit callback #92

Merged
merged 2 commits into from
Oct 24, 2013
Merged

after_commit callback #92

merged 2 commits into from
Oct 24, 2013

Conversation

tisba
Copy link
Contributor

@tisba tisba commented Oct 22, 2013

As suggested by @zimbatm and discussed in #81 I implemented an after_commit callback which will be fired, after the transaction was successfully committed. The callback can be specified on any state:

state :launching, :after_commit => :spawn_worker

Note that this is only available for ActiveRecord, since it's the only persistence implementation that supports transactions. The after_commit callback won't be fired for other persistence implementations.

I'm not happy with the specs I've added, and would like to have feedback on that (@alto).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) when pulling 41cdf56 on tisba:master into 86c24c4 on aasm:master.

alto added a commit that referenced this pull request Oct 24, 2013
@alto alto merged commit 080509e into aasm:master Oct 24, 2013
@alto
Copy link
Member

alto commented Oct 24, 2013

Thanks a lot. Looks nice! And more important, it works :)

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.

None yet

3 participants