Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reference to redis projects; remove need for json constructors in redis project; do not process saga actions on completed sagas #42

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

nick-cromwell
Copy link
Contributor

No description provided.

@GooRiOn GooRiOn changed the base branch from master to develop March 21, 2020 18:02
@nick-cromwell
Copy link
Contributor Author

@GooRiOn Hey, I know you're busy with DevMentors and all, could you take a look at this when you get time? I'm open to feedback on it. I'm using it in production and have a few other enhancements I could add but I'm afraid they won't get merged. This PR fixes some necessary project references as well.

I'm using EF Core as the Saga Log and Saga State store for my implementation. I think that would be very useful for a lot of .Net devs and I can add that sometime soon.

@@ -53,7 +53,7 @@ internal sealed class SagaCoordinator : ISagaCoordinator
{
var (isInitialized, state) = await _initializer.TryInitializeAsync(saga, id, message);

if (!isInitialized)
if (!isInitialized || state.State is SagaStates.Completed)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note, this is useful to avoid redundant processing. Some sagas may require interaction from a user outside of the normal flow - like clicking on a link in an e-mail, which they could do multiple times. I couldn't think of a case where one would want to process a message for a saga after it has already been marked Completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant