fix(playout): use stream download when fetching files (#2048)

This commit is contained in:
Jonas L 2022-08-12 15:14:19 +02:00 committed by GitHub
parent 1147853c63
commit 8897d390e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -52,8 +52,8 @@ class PypoFile(Thread):
with open(dst, "wb") as handle:
logger.info(media_item)
try:
response = self.api_client.download_file(file_id)
for chunk in response.iter_content(chunk_size=1024):
response = self.api_client.download_file(file_id, stream=True)
for chunk in response.iter_content(chunk_size=2048):
handle.write(chunk)
except HTTPError as exception: