forked from temporalio/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask_queue.go
More file actions
60 lines (57 loc) · 1.92 KB
/
Copy pathtask_queue.go
File metadata and controls
60 lines (57 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package taskqueue
import (
"github.com/temporalio/cli/common"
"github.com/temporalio/tctl-kit/pkg/output"
"github.com/urfave/cli/v2"
)
func NewTaskQueueCommands() []*cli.Command {
return []*cli.Command{
{
Name: "describe",
Usage: "Describe the Workers that have recently polled on this Task Queue",
Description: `The Server records the last time of each poll request. Poll requests can last up to a minute, so a LastAccessTime under a minute is normal. If it's over a minute, then likely either the Worker is at capacity (all Workflow and Activity slots are full) or it has shut down. Once it has been 5 minutes since the last poll request, the Worker is removed from the list.
RatePerSecond is the maximum Activities per second the Worker will execute.`,
Flags: append([]cli.Flag{
&cli.StringFlag{
Name: common.FlagTaskQueue,
Aliases: common.FlagTaskQueueAlias,
Usage: "Task Queue name",
Required: true,
Category: common.CategoryMain,
},
&cli.StringFlag{
Name: common.FlagTaskQueueType,
Value: "workflow",
Usage: "Task Queue type [workflow|activity]",
Category: common.CategoryMain,
},
}, common.FlagsForFormatting...),
Action: func(c *cli.Context) error {
return DescribeTaskQueue(c)
},
},
{
Name: "list-partition",
Usage: "List the Task Queue's partitions and which matching node they are assigned to",
Flags: []cli.Flag{
&cli.StringFlag{
Name: common.FlagTaskQueue,
Aliases: common.FlagTaskQueueAlias,
Usage: "Task Queue name",
Required: true,
Category: common.CategoryMain,
},
&cli.StringFlag{
Name: output.FlagOutput,
Aliases: common.FlagOutputAlias,
Usage: output.UsageText,
Value: string(output.Table),
Category: common.CategoryDisplay,
},
},
Action: func(c *cli.Context) error {
return ListTaskQueuePartitions(c)
},
},
}
}