Skip to content

Commit

Permalink
allow to configure the timeout with an env var
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Feb 9, 2024
1 parent fbdc51b commit 38404a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion anaconda_project/internal/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ def read_header(line):
self._progress = tqdm(**self._progress_kwargs)

try:
timeout_in_seconds = 60 * 10 # pretty long because we could be dealing with huge files
timeout_in_seconds = int(os.getenv(
'ANACONDA_PROJECT_DOWNLOADS_TIMEOUT',
60 * 10 # pretty long because we could be dealing with huge files
))
request = httpclient.HTTPRequest(url=self._url,
header_callback=read_header,
streaming_callback=writer,
Expand Down

0 comments on commit 38404a5

Please sign in to comment.