From: Michael Tremer Date: Tue, 4 Jul 2023 09:48:44 +0000 (+0000) Subject: importer: Catch TimeoutError when loading Geofeeds X-Git-Tag: 0.9.17~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=154376819143fec3a6ededfee60db63d67860a43;p=people%2Fms%2Flibloc.git importer: Catch TimeoutError when loading Geofeeds Signed-off-by: Michael Tremer --- diff --git a/src/scripts/location-importer.in b/src/scripts/location-importer.in index bea2192..bf83812 100644 --- a/src/scripts/location-importer.in +++ b/src/scripts/location-importer.in @@ -1407,6 +1407,11 @@ class CLI(object): except urllib.request.URLError as e: log.error("Could not fetch URL %s: %s" % (geofeed.url, e)) + # Catch connection timeouts + except TimeoutError as e: + self.db.execute("UPDATE geofeeds SET status = %s \ + WHERE id = %s", 599, geofeed.id) + # Mark the geofeed as updated else: self.db.execute("""