From 33b4957d07a09e311592c39dd8a0fd382ddee89b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nils=20m=C3=A5s=C3=A9n?= Date: Mon, 7 Dec 2020 20:09:43 +0100 Subject: [PATCH] fix default interval to be the intended value (#700) Co-authored-by: Simon Aronsson --- internal/flags/flags.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/flags/flags.go b/internal/flags/flags.go index af62062..2f7a89f 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -300,11 +300,11 @@ Should only be used for testing.`) // SetDefaults provides default values for environment variables func SetDefaults() { - day := time.Hour * 24 + day := (time.Hour * 24).Seconds() viper.AutomaticEnv() viper.SetDefault("DOCKER_HOST", "unix:///var/run/docker.sock") viper.SetDefault("DOCKER_API_VERSION", DockerAPIMinVersion) - viper.SetDefault("WATCHTOWER_POLL_INTERVAL", day.Seconds()) + viper.SetDefault("WATCHTOWER_POLL_INTERVAL", day) viper.SetDefault("WATCHTOWER_TIMEOUT", time.Second*10) viper.SetDefault("WATCHTOWER_NOTIFICATIONS", []string{}) viper.SetDefault("WATCHTOWER_NOTIFICATIONS_LEVEL", "info")