Download in larger chunks

This commit is contained in:
Sybren A. Stüvel 2016-03-15 15:35:18 +01:00
parent 012239a6c6
commit 7520421083

View File

@ -128,7 +128,7 @@ async def get_nodes(project_uuid: str = None, parent_node_uuid: str = None,
return children['_items'] return children['_items']
async def download_to_file(url, filename, chunk_size=10 * 1024, *, future: asyncio.Future = None): async def download_to_file(url, filename, chunk_size=100 * 1024, *, future: asyncio.Future = None):
"""Downloads a file via HTTP(S) directly to the filesystem.""" """Downloads a file via HTTP(S) directly to the filesystem."""
# TODO: use the file's ETag header to check whether we need to redownload the file at all. # TODO: use the file's ETag header to check whether we need to redownload the file at all.