Skip to content

Commit

Permalink
Increase download timeout for json files (#1556)
Browse files Browse the repository at this point in the history
* Increase json file download timeout from 10s to 180s
  • Loading branch information
guarin authored Jun 11, 2024
1 parent 2c8076a commit 4b58536
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lightly/api/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import tqdm

from lightly.api import utils
from lightly.api.swagger_api_client import DEFAULT_API_TIMEOUT

try:
import av
Expand Down Expand Up @@ -533,7 +534,7 @@ def download_json_file(
"""
request_kwargs = request_kwargs or {}
request_kwargs.setdefault("stream", True)
request_kwargs.setdefault("timeout", 10)
request_kwargs.setdefault("timeout", DEFAULT_API_TIMEOUT)
req = requests if session is None else session

response = req.get(url, **request_kwargs)
Expand Down

0 comments on commit 4b58536

Please sign in to comment.