Sometimes there are situations when an interactor operates with sensible resources, for example, with files. In my opinion, we should have a mechanism to do a final processing on that resources in case an error occurs.
Currently I'm creating a lot of files in my system, location of that files are calculated during execution of interactor and they are available only through interactor's context. So deleting them with ensure_hook solves my problem.
I hope this feature will be useful.
P.S. I will add more tests and docs if everything is ok.
Sometimes there are situations when an interactor operates with sensible resources, for example, with files. In my opinion, we should have a mechanism to do a final processing on that resources in case an error occurs.
Currently I'm creating a lot of files in my system, location of that files are calculated during execution of interactor and they are available only through interactor's context. So deleting them with ensure_hook solves my problem.
I hope this feature will be useful.
P.S. I will add more tests and docs if everything is ok.