From adcf58da68525a1d5ccfd62e9485a535a114778b Mon Sep 17 00:00:00 2001 From: Emile Vauge Date: Fri, 21 Oct 2016 16:02:18 +0200 Subject: [PATCH] Fix ProvidersThrottleDuration doc --- docs/toml.md | 6 +++--- server.go | 4 ++-- traefik.sample.toml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/toml.md b/docs/toml.md index 25245c4bc..b58f911ca 100644 --- a/docs/toml.md +++ b/docs/toml.md @@ -31,14 +31,14 @@ # # logLevel = "ERROR" -# Backends throttle duration: minimum duration between 2 events from providers +# Backends throttle duration: minimum duration in seconds between 2 events from providers # before applying a new configuration. It avoids unnecessary reloads if multiples events # are sent in a short amount of time. # # Optional -# Default: "2s" +# Default: "2" # -# ProvidersThrottleDuration = "5s" +# ProvidersThrottleDuration = "5" # If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used. # If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value. diff --git a/server.go b/server.go index 0cac574c9..fe7d83142 100644 --- a/server.go +++ b/server.go @@ -212,11 +212,11 @@ func (server *Server) listenProviders(stop chan bool) { lastConfigs.Set(configMsg.ProviderName, &configMsg) lastReceivedConfigurationValue := lastReceivedConfiguration.Get().(time.Time) if time.Now().After(lastReceivedConfigurationValue.Add(time.Duration(server.globalConfiguration.ProvidersThrottleDuration))) { - log.Debugf("Last %s config received more than %s, OK", configMsg.ProviderName, server.globalConfiguration.ProvidersThrottleDuration) + log.Debugf("Last %s config received more than %s, OK", configMsg.ProviderName, server.globalConfiguration.ProvidersThrottleDuration.String()) // last config received more than n s ago server.configurationValidatedChan <- configMsg } else { - log.Debugf("Last %s config received less than %s, waiting...", configMsg.ProviderName, server.globalConfiguration.ProvidersThrottleDuration) + log.Debugf("Last %s config received less than %s, waiting...", configMsg.ProviderName, server.globalConfiguration.ProvidersThrottleDuration.String()) safe.Go(func() { <-time.After(server.globalConfiguration.ProvidersThrottleDuration) lastReceivedConfigurationValue := lastReceivedConfiguration.Get().(time.Time) diff --git a/traefik.sample.toml b/traefik.sample.toml index 754e6cc80..905e55579 100644 --- a/traefik.sample.toml +++ b/traefik.sample.toml @@ -30,14 +30,14 @@ # # logLevel = "ERROR" -# Backends throttle duration: minimum duration between 2 events from providers +# Backends throttle duration: minimum duration in seconds between 2 events from providers # before applying a new configuration. It avoids unnecessary reloads if multiples events # are sent in a short amount of time. # # Optional -# Default: "2s" +# Default: "2" # -# ProvidersThrottleDuration = "5s" +# ProvidersThrottleDuration = "5" # If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used. # If you encounter 'too many open files' errors, you can either change this value, or change `ulimit` value.