fix: use Client subclient pattern for async activity completion#451
Open
donald-pinckney wants to merge 1 commit intomainfrom
Open
fix: use Client subclient pattern for async activity completion#451donald-pinckney wants to merge 1 commit intomainfrom
donald-pinckney wants to merge 1 commit intomainfrom
Conversation
Replace direct AsyncCompletionClient instantiation with the recommended pattern of creating Client first and accessing subclients as properties. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
|
Context: uncovered this when making the skill. Discussion was here: temporalio/skill-temporal-developer#31 (comment) |
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.
What was changed
Replace direct
AsyncCompletionClientinstantiation with the recommendedClientsubclient pattern in the async-completion activity example.Why?
The API docs note that "Typically AsyncCompletionClient should not be instantiated directly". The recommended pattern for ~3 years has been to create
Clientfirst, then access subclients as properties (client.activity.complete()).Checklist
Closes N/A - no issue, minor fix
How was this tested:
Run the samples in CI
Any docs updates needed?
The docs here use this code snippet. Do I need to do anything to re-sync the snipped to the docs?