Skip to content

Commit

Permalink
[FIX] Set timeout for file downloads to 30 minutes per file (pylint f…
Browse files Browse the repository at this point in the history
…inding) (#149)

* set timeout for file downloads to 30 minutes (pylint finding)

* Bump to version v2.1.0a6

* Revert "Bump to version v2.1.0a6"

This reverts commit 56f97aa.
  • Loading branch information
treee111 authored Sep 26, 2022
1 parent 1b5f89f commit ce48d55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wahoomc/file_directory_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ def download_url_to_file(url, map_file_path):
"""
download the content of a ULR to file
"""
request_geofabrik = requests.get(url, allow_redirects=True, stream=True)
# set timeout to 30 minutes (per file)
request_geofabrik = requests.get(
url, allow_redirects=True, stream=True, timeout=1800)
if request_geofabrik.status_code != 200:
log.error('! failed download URL: %s', url)
sys.exit()
Expand Down

0 comments on commit ce48d55

Please sign in to comment.