Skip to content

Commit

Permalink
Increase timeout to 10 minutes for slow connections
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Apr 24, 2024
1 parent b511688 commit 20d4139
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Then run `./activate.sh` to activate the shell.
ffmpeg and ffprobe are both version: 5.0

## Release History
* 2.7: Bugfix, increase the timeout to download for slow connections to 10 minutes.
* 2.6: Bugfix, `add_paths(...)` can now be called multiple times without polluting the os env path.
* 2.5: `add_paths()` now has optional `weak` parameter (default False). If True then `ffmpeg/ffprobe` binaries are only only if either `ffmpeg` OR `ffprobe` doesn't already exist on path
* 2.3: Adds `static_ffmpeg.add_paths()`
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
EMAIL = "[email protected]"
AUTHOR = "Zach Vorhies"
REQUIRES_PYTHON = ">=3.6.0"
VERSION = "2.6"
VERSION = "2.7"

# The text of the README file
with open(os.path.join(HERE, "README.md")) as fd:
Expand Down
2 changes: 1 addition & 1 deletion static_ffmpeg/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def download_file(url, local_path):
"""Downloads a file to the give path."""
# NOTE the stream=True parameter below
print(f"Downloading {url} -> {local_path}")
with requests.get(url, stream=True, timeout=60) as req:
with requests.get(url, stream=True, timeout=TIMEOUT) as req:
req.raise_for_status()
with open(local_path, "wb") as file_d:
for chunk in req.iter_content(chunk_size=8192 * 16):
Expand Down

0 comments on commit 20d4139

Please sign in to comment.