Skip to content

Commit

Permalink
set the default retry-interval unit to seconds
Browse files Browse the repository at this point in the history
without a unit it was using 3ns instead of 3s
  • Loading branch information
rgl committed Oct 8, 2021
1 parent 5923ca9 commit f9b9d01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/tink-worker/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
)

const (
defaultRetryInterval = 3
defaultRetryCount = 3
defaultMaxFileSize int64 = 10 * 1024 * 1024 // 10MB
defaultTimeoutMinutes = 60
defaultRetryIntervalSeconds = 3
defaultRetryCount = 3
defaultMaxFileSize int64 = 10 * 1024 * 1024 // 10MB
defaultTimeoutMinutes = 60
)

// NewRootCommand creates a new Tink Worker Cobra root command.
Expand Down Expand Up @@ -79,7 +79,7 @@ func NewRootCommand(version string, logger log.Logger) *cobra.Command {
},
}

rootCmd.Flags().Duration("retry-interval", defaultRetryInterval, "Retry interval in seconds (RETRY_INTERVAL)")
rootCmd.Flags().Duration("retry-interval", defaultRetryIntervalSeconds*time.Second, "Retry interval in seconds (RETRY_INTERVAL)")

rootCmd.Flags().Duration("timeout", defaultTimeoutMinutes*time.Minute, "Max duration to wait for worker to complete (TIMEOUT)")

Expand Down

0 comments on commit f9b9d01

Please sign in to comment.