Rollbacks overwriting each other
Reported by David Whittington | August 2nd, 2008 @ 12:19 PM
If I understand how on_rollback is supposed to work the following could should print out something containing "rollback 1" and "rollback 2":
task :blah do
transaction do
on_rollback { puts "rollback 1" }
on_rollback { puts "rollback 2" }
return
end
end
This is it actually prints out for me (excluding the exception introduced by the "return" statement):
$ cap blah
* executing `blah'
** transaction: start
*** [blah] rolling back
rollback 2
*** [blah] rolling back
rollback 2
It appears that the second rollback is being executed twice.
Comments and changes to this ticket
-

David Whittington August 19th, 2008 @ 09:20 AM
- → Tag changed from to committed
(from [1923c120f58091e01e281628c7f37ef1f9463d4f]) Make sure a task only uses the last on_rollback block, once, on rollback [#36 tagged:committed state:resolved] http://github.com/jamis/capistra...
-
Jamis Buck August 19th, 2008 @ 09:20 AM
- → State changed from new to resolved
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
