Skip to content

Commit

Permalink
fix refreshInterval using the pointer instead of the value
Browse files Browse the repository at this point in the history
  • Loading branch information
ckepper authored and miku committed Sep 19, 2019
1 parent d9eaba2 commit 470ad48
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/esbulk/esbulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,14 @@ func main() {
if *verbose {
log.Printf("on shutdown, number_of_replicas will be set back to %s", numberOfReplicas)
}

refreshInterval := *refreshInterval
if *verbose {
log.Printf("on shutdown, refresh_interval will be set back to %s", refreshInterval)
}
// Shutdown procedure. TODO(miku): Handle signals, too.
defer func() {
// Realtime search.
if _, err := indexSettingsRequest(fmt.Sprintf(`{"index": {"refresh_interval": %s}}`, refreshInterval), options); err != nil {
if _, err := indexSettingsRequest(fmt.Sprintf(`{"index": {"refresh_interval": "%s"}}`, refreshInterval), options); err != nil {
log.Fatal(err)
}
// Reset number of replicas.
Expand Down

0 comments on commit 470ad48

Please sign in to comment.