From 6b82734aa8cf20002e47b1c2353fa623e6f64725 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Mon, 15 Feb 2021 16:19:01 +0100 Subject: [PATCH] timezoned: only one api request per hour old-commit-hash: 84d2f162984440669a136f1c302316f226b5b9ca --- selfdrive/timezoned.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/selfdrive/timezoned.py b/selfdrive/timezoned.py index ec4bfb09a0..a7c7eb1d20 100755 --- a/selfdrive/timezoned.py +++ b/selfdrive/timezoned.py @@ -54,6 +54,8 @@ def main(): set_timezone(valid_timezones, r.text) else: cloudlog.error(f"Unexpected status code from api {r.status_code}") + + time.sleep(3600) # Don't make too many API requests except requests.exceptions.RequestException: cloudlog.exception("Error getting timezone based on IP") continue