#36 √ resolved
David Whittington

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

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 »

People watching this ticket

Tags