Skip to content

Commit

Permalink
chore: add logging to index downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh committed Feb 7, 2023
1 parent a590f3f commit 1cbf0ed
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion row.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ def get_files_from_index(from_location, task_index, task_count, total_size):
storage_client = google.cloud.storage.Client()
bucket = storage_client.bucket(from_location[5:])
blob = bucket.blob("index.txt")
blob.download_to_filename(str(index))

try:
blob.download_to_filename(str(index))
except Exception as ex:
logging.error("job %i: error downloading file index %s. %s", task_index, index, ex, exc_info=True)

raise ex

else:
folder = Path(from_location)

Expand Down

0 comments on commit 1cbf0ed

Please sign in to comment.