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 note on heart beating and async activities #1198

Conversation

Quinn-With-Two-Ns
Copy link
Contributor

Saw this multiple times in the past month were users are using RecordHeartbeat incorrectly

@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner August 10, 2023 15:56
Comment on lines +75 to +76
// Note: If using asynchronous activity completion,
// after returning [ErrResultPending] users should heartbeat with [client.Client.RecordActivityHeartbeat]
Copy link
Member

Choose a reason for hiding this comment

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

Curious: how are they even doing this if the activity has returned the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are launching a goroutine in their activity that is eventually trying to heartbeat. It is a poor use of asynchronous activity completion

@Quinn-With-Two-Ns Quinn-With-Two-Ns force-pushed the note-on-async-completion-and-heartbeat branch from 8713646 to 216151e Compare August 10, 2023 23:38
@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit c0a947b into temporalio:master Aug 11, 2023
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.

2 participants