task_queue_commands.go ×9

Frontier kind: Joint frontier

unlabeled · c_4139f05dce79

1 test · 3396 LOC · 142 files · introduces 1 test · 58 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges58 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
474 ranges3396 lines · 142 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

3 files ranked by introduced lines: 58 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/tools/tdbg/task_queue_commands.go 47 introduced LOC · 9 ranges

Open complete file

228
229 // AdminForceUnloadTaskQueuePartition forcefully unloads a task queue partition
230 > func AdminForceUnloadTaskQueuePartition(c *cli.Context, clientFactory ClientFactory) error { task_queue_commands.go
231 > // extracting the namespace
232 > namespace, err := getRequiredOption(c, FlagNamespace)
233 > if err != nil {
234 return err
235 }
236
237 // extracting the task queue name
238 > tqName, err := getRequiredOption(c, FlagTaskQueue) task_queue_commands.go
239 > if err != nil {
240 return err
241 }
242
243 // extracting the task queue type
244 > tqTypeString, err := getRequiredOption(c, FlagTaskQueueType) task_queue_commands.go
245 > if err != nil {
246 return err
247 }
248
249 > tlTypeInt, err := StringToEnum(tqTypeString, enumspb.TaskQueueType_value) task_queue_commands.go
250 > if err != nil {
251 > return fmt.Errorf("invalid task queue type: %w", err)
252 > }
253 > tqType := enumspb.TaskQueueType(tlTypeInt)
254 > if tqType == enumspb.TASK_QUEUE_TYPE_UNSPECIFIED {
255 > return errors.New("invalid task queue type") // nolint
256 > }
257
258 // extracting the task queue partition id
259 > partitionID := 0 task_queue_commands.go
260 > if c.IsSet(FlagPartitionID) {
261 > partitionID = c.Int(FlagPartitionID)
262 > }
263
264 // extracting the task queue partition sticky name
265 > stickyName := "" task_queue_commands.go
266 > if c.IsSet(FlagStickyName) {
267 > stickyName = c.String(FlagStickyName)
268 > }
269
270 > tqPartition := &taskqueuespb.TaskQueuePartition{ task_queue_commands.go
271 > TaskQueue: tqName,
272 > TaskQueueType: tqType,
273 > }
274 > if stickyName != "" {
275 > tqPartition.PartitionId = &taskqueuespb.TaskQueuePartition_StickyName{StickyName: stickyName}
276 > } else {
277 > tqPartition.PartitionId = &taskqueuespb.TaskQueuePartition_NormalPartitionId{NormalPartitionId: int32(partitionID)}
278 > }
279
280 > client := clientFactory.AdminClient(c) task_queue_commands.go
281 > req := &adminservice.ForceUnloadTaskQueuePartitionRequest{
282 > Namespace: namespace,
283 > TaskQueuePartition: tqPartition,
284 > }
285 >
286 > ctx, cancel := newContext(c)
287 > defer cancel()
288 > if response, e := client.ForceUnloadTaskQueuePartition(ctx, req); e != nil {
289 return fmt.Errorf("unable to describe Task Queue Partition: %w", e)
290 > } else { task_queue_commands.go
291 > prettyPrintJSONObject(c, response)
292 >
293 > }
294 > return nil
295 }
go.temporal.io/server/api/adminservice/v1/request_response.pb.go 8 introduced LOC · 1 range

Open complete file

5341 func (*ForceUnloadTaskQueuePartitionResponse) ProtoMessage() {}
5342
5343 > func (x *ForceUnloadTaskQueuePartitionResponse) ProtoReflect() protoreflect.Message { request_response.pb.go
5344 > mi := &file_temporal_server_api_adminservice_v1_request_response_proto_msgTypes[87]
5345 > if x != nil {
5346 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
5347 > if ms.LoadMessageInfo() == nil {
5348 > ms.StoreMessageInfo(mi)
5349 > }
5350 > return ms
5351 }
5352 return mi.MessageOf(x)
go.temporal.io/server/tools/tdbg/tdbg_commands.go 3 introduced LOC · 1 range

Open complete file

715 },
716 },
717 > Action: func(c *cli.Context) error { tdbg_commands.go
718 > return AdminForceUnloadTaskQueuePartition(c, clientFactory)
719 > },
720 },
721 {