Skip to content

Commit

Permalink
add activity_paused flag to ByID heartbeat response (#517)
Browse files Browse the repository at this point in the history
<!-- Describe what has changed in this PR -->
**What changed?**
Add "activity_paused" flag to RecordActivityTaskHeartbeatByIdResponse.

<!-- Tell your future self why have you made these changes -->
**Why?**
1. It is needed to let long-running activity know that activity was
paused on the server.
2. Because it is missing in RecordActivityTaskHeartbeatByIdResponse but
present in RecordActivityTaskHeartbeatResponse

<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**
No.
  • Loading branch information
ychebotarev authored Jan 16, 2025
1 parent 2a5b395 commit 5b6d2a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -10537,6 +10537,10 @@
"cancelRequested": {
"type": "boolean",
"description": "Will be set to true if the activity has been asked to cancel itself. The SDK should then\nnotify the activity of cancellation if it is still running."
},
"activityPaused": {
"type": "boolean",
"description": "Will be set to true if the activity is paused."
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7906,6 +7906,9 @@ components:
description: |-
Will be set to true if the activity has been asked to cancel itself. The SDK should then
notify the activity of cancellation if it is still running.
activityPaused:
type: boolean
description: Will be set to true if the activity is paused.
RecordActivityTaskHeartbeatRequest:
type: object
properties:
Expand Down
3 changes: 3 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ message RecordActivityTaskHeartbeatByIdResponse {
// Will be set to true if the activity has been asked to cancel itself. The SDK should then
// notify the activity of cancellation if it is still running.
bool cancel_requested = 1;

// Will be set to true if the activity is paused.
bool activity_paused = 2;
}

message RespondActivityTaskCompletedRequest {
Expand Down

0 comments on commit 5b6d2a5

Please sign in to comment.