-
Notifications
You must be signed in to change notification settings - Fork 179
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
Adding Accumulator Example #355
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still a lot of little stuff, but I did a first skim for obvious things
} | ||
|
||
log.Debug("Awaiting for " + timeout.String()) | ||
gotSignalBeforeTimeout, _ := workflow.AwaitWithTimeout(ctx, timeout, func() bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be worth noting that you're adding two events for every task that has a signal here. You are adding a timer start and potentially a timer cancel. This is technically fine, but may be worth noting. Some users choose to try to reuse timers instead of creating a new one each time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reworked this due to your feedback above about using a timer with a selector.
@Quinn-With-Two-Ns - unsure if you want to give this a review |
@cretz I saw this, I just had no additional comments to add after yours |
…ching signals at the end
What was changed
Adding accumulator pattern sample: accumulator and associated readme changes
Why?
This is a pattern that's pretty common, and I wanted to have a sample that I could share about it. Gathering a lot of signals, managing continue as new, demonstrating signal with start, all good stuff to have.
Checklist
Closes N/A
How was this tested:
Tested locally, tests in accumulate_signals_workflow_test.go
Any docs updates needed?
No