Skip to content

Commit

Permalink
Merge pull request #873 from ploxiln/duration_options_nocompat
Browse files Browse the repository at this point in the history
nsqd: remove back-compat for flag duration ints
  • Loading branch information
mreiferson authored Mar 30, 2017
2 parents b1e2262 + af6f99e commit ccbb9c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/nsqd/nsqd.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func nsqdFlagSet(opts *nsqd.Options) *flag.FlagSet {
flagSet.Duration("sync-timeout", opts.SyncTimeout, "duration of time per diskqueue fsync")

// msg and command options
flagSet.String("msg-timeout", opts.MsgTimeout.String(), "duration to wait before auto-requeing a message")
flagSet.Duration("msg-timeout", opts.MsgTimeout, "default duration to wait before auto-requeing a message")
flagSet.Duration("max-msg-timeout", opts.MaxMsgTimeout, "maximum duration before a message will timeout")
flagSet.Int64("max-msg-size", opts.MaxMsgSize, "maximum size of a single message in bytes")
flagSet.Duration("max-req-timeout", opts.MaxReqTimeout, "maximum requeuing timeout for a message")
Expand All @@ -117,7 +117,7 @@ func nsqdFlagSet(opts *nsqd.Options) *flag.FlagSet {

// statsd integration options
flagSet.String("statsd-address", opts.StatsdAddress, "UDP <addr>:<port> of a statsd daemon for pushing stats")
flagSet.String("statsd-interval", opts.StatsdInterval.String(), "duration between pushing to statsd")
flagSet.Duration("statsd-interval", opts.StatsdInterval, "duration between pushing to statsd")
flagSet.Bool("statsd-mem-stats", opts.StatsdMemStats, "toggle sending memory and GC stats to statsd")
flagSet.String("statsd-prefix", opts.StatsdPrefix, "prefix used for keys sent to statsd (%s for host replacement)")

Expand Down
4 changes: 2 additions & 2 deletions nsqd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type Options struct {
QueueScanDirtyPercent float64

// msg and command options
MsgTimeout time.Duration `flag:"msg-timeout" arg:"1ms"`
MsgTimeout time.Duration `flag:"msg-timeout"`
MaxMsgTimeout time.Duration `flag:"max-msg-timeout"`
MaxMsgSize int64 `flag:"max-msg-size"`
MaxBodySize int64 `flag:"max-body-size"`
Expand All @@ -54,7 +54,7 @@ type Options struct {
// statsd integration
StatsdAddress string `flag:"statsd-address"`
StatsdPrefix string `flag:"statsd-prefix"`
StatsdInterval time.Duration `flag:"statsd-interval" arg:"1s"`
StatsdInterval time.Duration `flag:"statsd-interval"`
StatsdMemStats bool `flag:"statsd-mem-stats"`

// e2e message latency
Expand Down

0 comments on commit ccbb9c3

Please sign in to comment.