Skip to content

Commit

Permalink
🚨 Add 10 minute timeout to download
Browse files Browse the repository at this point in the history
  • Loading branch information
jemrobinson committed Mar 7, 2024
1 parent 6450db7 commit 8ca2885
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shui/classes/fileinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def is_hashfile(self) -> bool:

def download(self) -> None:
"""Download this Spark/Hadoop version from a remote URL to a local path"""
response = requests.get(self.url, stream=True, allow_redirects=True)
response = requests.get(
self.url, stream=True, allow_redirects=True, timeout=600
)
content_length = response.headers.get("content-length")
total_bytes = int(content_length) if content_length else None
with open(self.path, "wb") as output_file:
Expand Down

0 comments on commit 8ca2885

Please sign in to comment.