From 1cbf0ed2d59aec8e81d8d64bf9dead10b9a0e629 Mon Sep 17 00:00:00 2001 From: steveoh Date: Tue, 31 Jan 2023 15:51:06 -0700 Subject: [PATCH] chore: add logging to index downloading --- row.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/row.py b/row.py index 2c59949..536b8cd 100644 --- a/row.py +++ b/row.py @@ -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)