Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement hard shutdown timeout of 25 seconds.
Your job funcs should implement
context
package semantics. If you useManager.Run
, FWG will now gracefully shutdown. After a default delay of 25 seconds, FWG will cancel the root Context which should quickly cancel any lingering jobs running under that Manager. If your jobs run long and do not respond to context cancellation, you risk orphaning any jobs in-progress. They will linger on the Busy tab until the job'sreserve_for
timeout.Please also note that
Manager.RunWithContext
added in1.6.0
does not implement the shutdown delay but the README example contains the code to implement it.Fixes #76