Nebo15 / sage

A dependency-free tool to run distributed transactions in Elixir, inspired by Sagas pattern.
MIT License
931 stars 41 forks source link

Fix Compensation Function Definitions #25

Closed Math3v closed 6 years ago

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling ea97f6dba19ce171dae1e5ee4ba88603e5fabe51 on Math3v:fix-readme into bfc866fed8aa8e054f6e9960c48841582bae3dad on Nebo15:master.

AndrewDryga commented 6 years ago

Good catch, forgot to update them when changed compensation interface. Thank you 👍

AndrewDryga commented 6 years ago

@Math3v I think I've failed here. Lately, we removed one of the arguments from compensation interface, it's was there so that people can match stage and apply circuit breaker when failure occurred on the same stage but there was a better way - ignore the circuit breaker when it's called from other stage and this argument by itself was a leaky abstraction. I'll revert the revertion :).

Math3v commented 6 years ago

@AndrewDryga Makes sense. But then we should update also the Compensation Function Type: https://github.com/Nebo15/sage/pull/28