snatch-dev / Chronicle

Implementation of saga pattern for .NET Core
MIT License
397 stars 70 forks source link

Option to remove SagaLog and SagaState from configured persistence. #24

Closed nick-cromwell closed 4 years ago

nick-cromwell commented 5 years ago

https://github.com/chronicle-stack/Chronicle/blob/128bdeb31efc4e1deaf9e709fe2be916b8a04e44/src/Chronicle/Managers/SagaPostProcessor.cs#L28-L31

I'm working on a RedisSagaStateRepository and RedisSagaLog. Do you think a configuration option to immediately remove the SagaLog and SagaState on SagaStatus.Completed would be appropriate or leave that for the onComplete() and onRejected() methods?

I think it would require adding void Remove(SagaId id, Type type) to ISagaLog and ISagaStateRepository.