MCPcopy Create free account
hub / github.com/temporalio/temporal / getBacklogCount

Method getBacklogCount

tests/task_queue_test.go:167–176  ·  view source on GitHub ↗
(env *testcore.TestEnv, tv *testvars.TestVars)

Source from the content-addressed store, hash-verified

165}
166
167func (s *TaskQueueSuite) getBacklogCount(env *testcore.TestEnv, tv *testvars.TestVars) int64 {
168 resp, err := env.FrontendClient().DescribeTaskQueue(s.Context(), &workflowservice.DescribeTaskQueueRequest{
169 Namespace: env.Namespace().String(),
170 TaskQueue: tv.TaskQueue(),
171 ApiMode: enumspb.DESCRIBE_TASK_QUEUE_MODE_ENHANCED,
172 ReportStats: true,
173 })
174 s.NoError(err)
175 return resp.GetVersionsInfo()[""].GetTypesInfo()[sdkclient.TaskQueueTypeWorkflow].GetStats().GetApproximateBacklogCount()
176}
177
178func (s *TaskQueueSuite) testTaskQueueRateLimitName(nPartitions, nWorkers int, useNewMatching bool) string {
179 ret := fmt.Sprintf("%vPartitions_%vWorkers", nPartitions, nWorkers)

Callers 1

Calls 9

NoErrorMethod · 0.80
GetStatsMethod · 0.80
DescribeTaskQueueMethod · 0.65
FrontendClientMethod · 0.65
ContextMethod · 0.65
StringMethod · 0.65
NamespaceMethod · 0.65
TaskQueueMethod · 0.65

Tested by

no test coverage detected