Skip to content

Commit

Permalink
Command flag naming adjustment
Browse files Browse the repository at this point in the history
Fix interval first duration
  • Loading branch information
vapopov committed Aug 22, 2024
1 parent 70b7c54 commit 6675c32
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tool/tctl/common/autoupdate_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *AutoupdateCommand) Initialize(app *kingpin.Application, config *service
autoupdateCmd := app.Command("autoupdate", "Teleport autoupdate commands.")

c.updateCmd = autoupdateCmd.Command("update", "Edit autoupdate configuration.")
c.updateCmd.Flag("set-tools-auto-update", `Enable or disable tools autoupdate in cluster.`).EnumVar(&c.toolsAutoupdate, "on", "off")
c.updateCmd.Flag("set-tools-autoupdate", `Enable or disable tools autoupdate in cluster.`).EnumVar(&c.toolsAutoupdate, "on", "off")
c.updateCmd.Flag("set-tools-version", `Defines client tools version required to be force updated.`).StringVar(&c.toolsAutoupdateVersion)

c.getCmd = autoupdateCmd.Command("get", "Receive tools autoupdate version.")
Expand Down Expand Up @@ -155,9 +155,10 @@ func (c *AutoupdateCommand) Get(ctx context.Context, client *authclient.Client)
func (c *AutoupdateCommand) Watch(ctx context.Context, client *authclient.Client) error {
current := teleport.SemVersion
ticker := interval.New(interval.Config{
Duration: time.Minute,
FirstDuration: time.Second,
Duration: time.Minute,
})
ticker.FireNow()
defer ticker.Stop()

for {
select {
Expand Down

0 comments on commit 6675c32

Please sign in to comment.