Skip to content

Commit

Permalink
add ResetActivity API
Browse files Browse the repository at this point in the history
  • Loading branch information
ychebotarev committed Aug 20, 2024
1 parent 3d44dc8 commit 37d5afc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
19 changes: 17 additions & 2 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1702,9 +1702,24 @@ message ResumeActivityRequest {
string activity_id = 4;

bool trigger_immediately = 5;
bool reset_attempts = 6;

string identity = 7;
string identity = 6;
}

message ResumeActivityResponse {
}

message ResetActivityRequest {
string namespace = 1;
string workflow_id = 2;
string run_id = 3 ;
string activity_id = 4;

bool trigger_immediately = 5;
bool keep_paused = 6;

string identity = 7;
}

message ResetActivityResponse {
}
14 changes: 13 additions & 1 deletion temporal/api/workflowservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ service WorkflowService {
}
};
}
// ResumeActivity will basically unpause the activity is the activity is in the paused state.
// ResumeActivity will unpause the activity is the activity is in the paused state.
rpc ResumeActivity (ResumeActivityRequest) returns (ResumeActivityResponse)
{
option (google.api.http) = {
Expand All @@ -884,4 +884,16 @@ service WorkflowService {
}
};
}
// Reset will reset activity to an initial state.
rpc ResetActivity (ResetActivityRequest) returns (ResetActivityResponse)
{
option (google.api.http) = {
post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset"
body: "*"
additional_bindings {
post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset"
body: "*"
}
};
}
}

0 comments on commit 37d5afc

Please sign in to comment.