diff --git a/cmd/esbulk/esbulk.go b/cmd/esbulk/esbulk.go index c5c5b93..7f5cca9 100644 --- a/cmd/esbulk/esbulk.go +++ b/cmd/esbulk/esbulk.go @@ -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.