From: Michael Tremer Date: Tue, 4 Feb 2020 11:22:20 +0000 (+0000) Subject: mirrors: Stop emailing Michael if a mirror is down X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0661e16bcb30db688378a7436eaedaa1ae42d448;p=ipfire.org.git mirrors: Stop emailing Michael if a mirror is down Signed-off-by: Michael Tremer --- diff --git a/src/backend/mirrors.py b/src/backend/mirrors.py index 599dc453..27691dc2 100644 --- a/src/backend/mirrors.py +++ b/src/backend/mirrors.py @@ -236,27 +236,27 @@ class Mirror(Object): response = await http.fetch(self.url + ".timestamp", headers={ "Pragma" : "no-cache" }) except tornado.httpclient.HTTPError as e: - logging.error("Error getting timestamp from %s: %s" % (self.hostname, e)) + logging.warning("Error getting timestamp from %s: %s" % (self.hostname, e)) self.set_state("DOWN") return False except ssl.SSLError as e: - logging.error("SSL error when getting timestamp from %s: %s" % (self.hostname, e)) + logging.warning("SSL error when getting timestamp from %s: %s" % (self.hostname, e)) self.set_state("DOWN") return False except tornado.iostream.StreamClosedError as e: - logging.error("Connection closed unexpectedly for %s: %s" % (self.hostname, e)) + logging.warning("Connection closed unexpectedly for %s: %s" % (self.hostname, e)) self.set_state("DOWN") return False except OSError as e: - logging.error("Could not connect to %s: %s" % (self.hostname, e)) + logging.warning("Could not connect to %s: %s" % (self.hostname, e)) self.set_state("DOWN") return False if response.error: - logging.debug("Error getting timestamp from %s" % self.hostname) + logging.warning("Error getting timestamp from %s" % self.hostname) self.set_state("DOWN") return diff --git a/src/crontab/ipfire b/src/crontab/ipfire index 9bb97240..4122f187 100644 --- a/src/crontab/ipfire +++ b/src/crontab/ipfire @@ -19,7 +19,7 @@ SHELL=/bin/bash 30 * * * * nobody ipfire.org cleanup # Check mirrors once every 30 min -*/30 * * * * nobody ipfire.org check-mirrors +*/30 * * * * nobody ipfire.org --logging=error check-mirrors # Tweet once a week 0 8 * * * nobody sleep ${RANDOM} && ipfire.org tweet