timeout!
parent
8d5ba035a9
commit
3f8064ed25
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue