Expose WorkflowLockTimeout and ActivityLockTimeout options - #404
Merged
Conversation
Co-authored-by: cschleiden <2201819+cschleiden@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Expose
Expose WorkflowLockTimeout and ActivityLockTimeout options
Aug 14, 2025
WorkflowLockTimeout and ActivityLockTimeout options
cschleiden
reviewed
Aug 14, 2025
…ckTimeout options - Add GoDoc comments for WithWorkflowLockTimeout and WithActivityLockTimeout functions - Add both options to public documentation in _backends.md with default values - Addresses review feedback on PR #403 Co-authored-by: cschleiden <2201819+cschleiden@users.noreply.github.com>
cschleiden
marked this pull request as ready for review
August 14, 2025 20:03
cschleiden
enabled auto-merge
August 14, 2025 20:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR exposes the
WorkflowLockTimeoutandActivityLockTimeoutconfiguration options by adding correspondingWith*option functions to the backend package.Problem
The
Optionsstruct inbackend/options.goalready containedWorkflowLockTimeoutandActivityLockTimeoutfields with default values (1 minute and 2 minutes respectively), but there was no way for users to customize these timeouts when creating backend instances. Users could only use the hardcoded default values.Solution
Added two new option functions following the existing pattern:
Usage
Users can now customize these timeouts when configuring backends:
Testing
The changes are minimal and surgical - just 12 lines of new production code following the exact same pattern as existing option functions like
WithStickyTimeout,WithLogger, etc.Fixes #403.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.