From c89c462c891e7aebbea65a68aae527a6984bf4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?= <lukas.kaemmerling@hetzner-cloud.de> Date: Tue, 24 Aug 2021 13:50:15 +0200 Subject: [PATCH] Increase default polling interval to 3 seconds. (#230) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Calling the API every second is not needed as most actions are done in less than three seconds, so we can easily save a few API requests here. Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de> --- cmd/driver/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/driver/main.go b/cmd/driver/main.go index 9123a2c..cb3e4ee 100644 --- a/cmd/driver/main.go +++ b/cmd/driver/main.go @@ -78,7 +78,7 @@ func main() { opts = append(opts, hcloud.WithDebugWriter(os.Stdout)) } - pollingInterval := 1 + pollingInterval := 3 if customPollingInterval := os.Getenv("HCLOUD_POLLING_INTERVAL_SECONDS"); customPollingInterval != "" { tmp, err := strconv.Atoi(customPollingInterval) if err != nil || tmp < 1 { -- GitLab