Skip to content

Commit

Permalink
Merge pull request nsqio#1178 from andyxning/add_queue-scan-worker-po…
Browse files Browse the repository at this point in the history
…ol-max_command_line_argument

nsqd: add some queue-scan options flags
  • Loading branch information
ploxiln authored Aug 30, 2019
2 parents 81b8b9e + e4e927d commit 6774510
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions apps/nsqd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func nsqdFlagSet(opts *nsqd.Options) *flag.FlagSet {
flagSet.Int64("sync-every", opts.SyncEvery, "number of messages per diskqueue fsync")
flagSet.Duration("sync-timeout", opts.SyncTimeout, "duration of time per diskqueue fsync")

flagSet.Int("queue-scan-worker-pool-max", opts.QueueScanWorkerPoolMax, "max concurrency for checking in-flight and deferred message timeouts")
flagSet.Int("queue-scan-selection-count", opts.QueueScanSelectionCount, "number of channels to check per cycle (every 100ms) for in-flight and deferred timeouts")

// msg and command options
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")
Expand Down
4 changes: 2 additions & 2 deletions nsqd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ type Options struct {

QueueScanInterval time.Duration
QueueScanRefreshInterval time.Duration
QueueScanSelectionCount int
QueueScanWorkerPoolMax int
QueueScanSelectionCount int `flag:"queue-scan-selection-count"`
QueueScanWorkerPoolMax int `flag:"queue-scan-worker-pool-max"`
QueueScanDirtyPercent float64

// msg and command options
Expand Down

0 comments on commit 6774510

Please sign in to comment.