Skip to content

Commit c108f26

Browse files
authored
Change the default chunk_size to a clear representation & add documentation (#22222)
1 parent af9d85c commit c108f26

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • airflow/providers/google/suite/hooks

airflow/providers/google/suite/hooks/drive.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,13 @@ def upload_file(
219219
self.log.info("File %s uploaded to gdrive://%s.", local_location, remote_location)
220220
return file.get("id")
221221

222-
def download_file(self, file_id: str, file_handle: IO, chunk_size: int = 104857600):
222+
def download_file(self, file_id: str, file_handle: IO, chunk_size: int = 100 * 1024 * 1024):
223223
"""
224224
Download a file from Google Drive.
225225
226226
:param file_id: the id of the file
227227
:param file_handle: file handle used to write the content to
228+
:param chunk_size: File will be downloaded in chunks of this many bytes.
228229
"""
229230
request = self.get_media_request(file_id=file_id)
230231
self.download_content_from_request(file_handle=file_handle, request=request, chunk_size=chunk_size)

0 commit comments

Comments
 (0)