Transaction
- Definition
- Transaction (&block)
- Module
- Capistrano::Configuration::Execution
- File
- capistrano/configuration/execution.rb
Invoke a set of tasks in a transaction within a task. If any task fails (raises an exception), all tasks executed within the transaction are inspected to see if they have an associated on_rollback hook, and if so, that hook is called.
transaction do update_code symlink end
In the example above, if either update_code or symlink fail, on_rollback hooks within and prior to the task which failed will be called.