Skip to content

Commit

Permalink
Update progress after GCS download finished (#1698)
Browse files Browse the repository at this point in the history
With this commit we ensure that the progress indicator is updated once
again after a download from a GCS bucket has finished.
  • Loading branch information
danielmitterdorfer committed Apr 3, 2023
1 parent ea01989 commit 1d1e1f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions esrally/utils/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ def _download_from_gcs_bucket(bucket_name, bucket_path, local_path, expected_siz
if progress_indicator and download.bytes_downloaded and download.total_bytes:
progress_indicator(download.bytes_downloaded, expected_size_in_bytes)
download.consume_next_chunk(transport)
# show final progress (for large files) or any progress (for files < chunk_size)
if progress_indicator and download.bytes_downloaded and expected_size_in_bytes:
progress_indicator(download.bytes_downloaded, expected_size_in_bytes)


def download_from_bucket(blobstore, url, local_path, expected_size_in_bytes=None, progress_indicator=None):
Expand Down

0 comments on commit 1d1e1f9

Please sign in to comment.