From 3f8064ed25437162c8c92bf81c93b806260b5dc2 Mon Sep 17 00:00:00 2001 From: Israel Figueroa Date: Mon, 23 Oct 2023 18:17:23 -0300 Subject: [PATCH] timeout! --- fetcher/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetcher/main.py b/fetcher/main.py index 8695e6a..6af79d9 100644 --- a/fetcher/main.py +++ b/fetcher/main.py @@ -24,7 +24,7 @@ def load_proto(): final_name = "static/ccp/{}/{}/{}/ccp_gtfs_{}.proto".format(inicio.strftime("%Y"), inicio.strftime("%m"), inicio.strftime("%d"), inicio.strftime("%Y%m%d_%H%M_%S")) try: - response = requests.get("{}?apikey={}".format(os.environ.get('GTFS_RT_ENDPOINT'), os.environ.get('GTFS_RT_KEY'))) + response = requests.get("{}?apikey={}".format(os.environ.get('GTFS_RT_ENDPOINT'), os.environ.get('GTFS_RT_KEY')), timeout=15) response.raise_for_status() with NamedTemporaryFile() as tmp: tmp.write(response.content)