Skip to content

Interactor Style Command Rollback

Compare
Choose a tag to compare
@dradford dradford released this 08 Aug 17:58
· 21 commits to master since this release

This version updates command logic in two ways

  • When a command fails it does not call its rollback method
  • When an invoked command fails, the invoker does not roll
    it back (but it does roll back the commands prior to it
    that succeeded)

This follows from the idea that a command should have one responsibility so if it fails it does not need to be rolled back. This is how the interactor gem handles it: https://github.com/collectiveidea/interactor#rollback

We need this behavior for Adama to work as a drop-in replacement for Interactor