Skip to content

Commit

Permalink
Merge pull request #1074 from alpaker/rename-sync-interval
Browse files Browse the repository at this point in the history
apps/nsq_to_file: rename flag -rotate-check-interval to -sync-interval
  • Loading branch information
mreiferson authored Aug 21, 2018
2 parents e0e08a2 + b0cedaa commit b8261d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/nsq_to_file/file_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (f *FileLogger) router(r *nsq.Consumer) {
pos := 0
output := make([]*nsq.Message, *maxInFlight)
sync := false
ticker := time.NewTicker(*rotateCheckInterval)
ticker := time.NewTicker(*syncInterval)
closing := false
closeFile := false
exit := false
Expand Down
2 changes: 1 addition & 1 deletion apps/nsq_to_file/nsq_to_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (

rotateSize = flag.Int64("rotate-size", 0, "rotate the file when it grows bigger than `rotate-size` bytes")
rotateInterval = flag.Duration("rotate-interval", 0*time.Second, "rotate the file every duration")
rotateCheckInterval = flag.Duration("rotate-check-interval", 30*time.Second, "check whether the file should be rotated every duration")
syncInterval = flag.Duration("sync-interval", 30*time.Second, "sync file to disk every duration")

httpConnectTimeout = flag.Duration("http-client-connect-timeout", 2*time.Second, "timeout for HTTP connect")
httpRequestTimeout = flag.Duration("http-client-request-timeout", 5*time.Second, "timeout for HTTP request")
Expand Down

0 comments on commit b8261d5

Please sign in to comment.