mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-16 22:35:11 -06:00
feat: add retry count to assigned action
This commit is contained in:
@@ -98,6 +98,9 @@ message AssignedAction {
|
||||
|
||||
// the step name
|
||||
string stepName = 12;
|
||||
|
||||
// the number of previous attempts of the step run (0-based)
|
||||
int32 retryCount = 13;
|
||||
}
|
||||
|
||||
message WorkerListenRequest {
|
||||
|
||||
@@ -497,6 +497,8 @@ type AssignedAction struct {
|
||||
ActionPayload string `protobuf:"bytes,11,opt,name=actionPayload,proto3" json:"actionPayload,omitempty"`
|
||||
// the step name
|
||||
StepName string `protobuf:"bytes,12,opt,name=stepName,proto3" json:"stepName,omitempty"`
|
||||
// the number of previous attempts of the step run (0-based)
|
||||
RetryCount int32 `protobuf:"varint,13,opt,name=retryCount,proto3" json:"retryCount,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AssignedAction) Reset() {
|
||||
@@ -615,6 +617,13 @@ func (x *AssignedAction) GetStepName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AssignedAction) GetRetryCount() int32 {
|
||||
if x != nil {
|
||||
return x.RetryCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type WorkerListenRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -1725,7 +1734,7 @@ var file_dispatcher_proto_rawDesc = []byte{
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x22, 0x8b, 0x03, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x74,
|
||||
0x22, 0xab, 0x03, 0x0a, 0x0e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12,
|
||||
0x24, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x49, 0x64,
|
||||
@@ -1749,7 +1758,9 @@ var file_dispatcher_proto_rawDesc = []byte{
|
||||
0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x65, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x65, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x31,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x65, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x31,
|
||||
0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49,
|
||||
|
||||
@@ -61,6 +61,7 @@ func (worker *subscribedWorker) StartStepRun(
|
||||
ActionPayload: string(inputBytes),
|
||||
StepName: stepName,
|
||||
WorkflowRunId: sqlchelpers.UUIDToStr(stepRun.WorkflowRunId),
|
||||
RetryCount: stepRun.StepRun.RetryCount,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -104,6 +105,7 @@ func (worker *subscribedWorker) CancelStepRun(
|
||||
ActionType: contracts.ActionType_CANCEL_STEP_RUN,
|
||||
StepName: stepRun.StepReadableId.String,
|
||||
WorkflowRunId: sqlchelpers.UUIDToStr(stepRun.WorkflowRunId),
|
||||
RetryCount: stepRun.StepRun.RetryCount,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user