mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Only update hash when config reload succeeds
Signed-off-by: Julien <roidelapluie@o11y.eu>
This commit is contained in:
parent
1cd2d0498b
commit
cfe8b5616f
|
@ -1163,7 +1163,6 @@ func main() {
|
||||||
rc <- err
|
rc <- err
|
||||||
} else {
|
} else {
|
||||||
rc <- nil
|
rc <- nil
|
||||||
}
|
|
||||||
if cfg.enableAutoReload {
|
if cfg.enableAutoReload {
|
||||||
if currentChecksum, err := config.GenerateChecksum(cfg.configFile); err == nil {
|
if currentChecksum, err := config.GenerateChecksum(cfg.configFile); err == nil {
|
||||||
checksum = currentChecksum
|
checksum = currentChecksum
|
||||||
|
@ -1171,6 +1170,7 @@ func main() {
|
||||||
level.Error(logger).Log("msg", "Failed to generate checksum during configuration reload", "err", err)
|
level.Error(logger).Log("msg", "Failed to generate checksum during configuration reload", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case <-time.Tick(time.Duration(cfg.autoReloadInterval)):
|
case <-time.Tick(time.Duration(cfg.autoReloadInterval)):
|
||||||
if !cfg.enableAutoReload {
|
if !cfg.enableAutoReload {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue