File tree Expand file tree Collapse file tree 7 files changed +74
-6
lines changed Expand file tree Collapse file tree 7 files changed +74
-6
lines changed Original file line number Diff line number Diff line change @@ -66,3 +66,5 @@ require (
66
66
gopkg.in/yaml.v3 v3.0.1 // indirect
67
67
honnef.co/go/tools v0.3.2 // indirect
68
68
)
69
+
70
+ replace github.com/uber/cadence-idl => github.com/timl3136/cadence-idl v0.0.0-20230811235258-a2fc7af34b3e
Original file line number Diff line number Diff line change @@ -194,6 +194,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
194
194
github.com/stretchr/testify v1.8.0 /go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU =
195
195
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk =
196
196
github.com/stretchr/testify v1.8.1 /go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4 =
197
+ github.com/timl3136/cadence-idl v0.0.0-20230811235258-a2fc7af34b3e h1:3E7jeCTrIErCi7XI1rSpxjSBUoyphW8ssLq7k7whTpY =
198
+ github.com/timl3136/cadence-idl v0.0.0-20230811235258-a2fc7af34b3e /go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws =
197
199
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM =
198
200
github.com/tklauser/go-sysconf v0.3.11 /go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI =
199
201
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms =
@@ -204,8 +206,6 @@ github.com/uber-go/mapdecode v1.0.0/go.mod h1:b5nP15FwXTgpjTjeA9A2uTHXV5UJCl4arw
204
206
github.com/uber-go/tally v3.3.12+incompatible /go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU =
205
207
github.com/uber-go/tally v3.3.15+incompatible h1:9hLSgNBP28CjIaDmAuRTq9qV+UZY+9PcvAkXO4nNMwg =
206
208
github.com/uber-go/tally v3.3.15+incompatible /go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU =
207
- github.com/uber/cadence-idl v0.0.0-20230131090243-b690237fffaa h1:hL0lacJisx3N7az86s2Mg8J67R+d7arO3ykiExzMsTA =
208
- github.com/uber/cadence-idl v0.0.0-20230131090243-b690237fffaa /go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws =
209
209
github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM =
210
210
github.com/uber/jaeger-client-go v2.22.1+incompatible /go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk =
211
211
github.com/uber/jaeger-lib v2.2.0+incompatible /go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U =
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ func PollForDecisionTaskResponse(t *shared.PollForDecisionTaskResponse) *apiv1.P
223
223
StartedTime : unixNanoToTime (t .StartedTimestamp ),
224
224
Queries : WorkflowQueryMap (t .Queries ),
225
225
NextEventId : t .GetNextEventId (),
226
+ HistorySize : t .GetHistorySize (),
226
227
}
227
228
}
228
229
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ func PollForDecisionTaskResponse(t *apiv1.PollForDecisionTaskResponse) *shared.P
223
223
StartedTimestamp : timeToUnixNano (t .StartedTime ),
224
224
Queries : WorkflowQueryMap (t .Queries ),
225
225
NextEventId : & t .NextEventId ,
226
+ HistorySize : & t .HistorySize ,
226
227
}
227
228
}
228
229
Original file line number Diff line number Diff line change @@ -1158,6 +1158,16 @@ func (wc *workflowEnvironmentInterceptor) GetMetricsScope(ctx Context) tally.Sco
1158
1158
return wc .env .GetMetricsScope ()
1159
1159
}
1160
1160
1161
+ // GetHistorySize returns the current history size of that workflow
1162
+ func GetHistorySize (ctx Context ) int64 {
1163
+ return 0
1164
+ }
1165
+
1166
+ // GetHistoryCount returns the current number of events of that workflow
1167
+ func GetHistoryCount (ctx Context ) int64 {
1168
+ return 0
1169
+ }
1170
+
1161
1171
// Now returns the current time in UTC. It corresponds to the time when the decision task is started or replayed.
1162
1172
// Workflow needs to use this method to get the wall clock time instead of the one from the golang library.
1163
1173
func Now (ctx Context ) time.Time {
Original file line number Diff line number Diff line change @@ -217,6 +217,16 @@ func GetMetricsScope(ctx Context) tally.Scope {
217
217
return internal .GetMetricsScope (ctx )
218
218
}
219
219
220
+ // GetHistorySize returns the current history size of that workflow
221
+ func GetHistorySize (ctx Context ) int64 {
222
+ return internal .GetHistorySize (ctx )
223
+ }
224
+
225
+ // GetHistoryCount returns the current number of history event of that workflow
226
+ func GetHistoryCount (ctx Context ) int64 {
227
+ return internal .GetHistoryCount (ctx )
228
+ }
229
+
220
230
// RequestCancelExternalWorkflow can be used to request cancellation of an external workflow.
221
231
// Input workflowID is the workflow ID of target workflow.
222
232
// Input runID indicates the instance of a workflow. Input runID is optional (default is ""). When runID is not specified,
You can’t perform that action at this time.
0 commit comments