Skip to content

Commit f9593d5

Browse files
Merge pull request #1270 from gooddata/snapshot-master-bb5e9621-to-rel/dev
[bot] Merge master/bb5e9621 into rel/dev
2 parents 897c20c + bb5e962 commit f9593d5

File tree

1 file changed

+16
-2
lines changed
  • packages/gooddata-pipelines/src/gooddata_pipelines/backup_and_restore

1 file changed

+16
-2
lines changed

packages/gooddata-pipelines/src/gooddata_pipelines/backup_and_restore/backup_manager.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def _get_workspace_export(
164164
"""
165165
exported = False
166166
for workspace_id in workspaces_to_export:
167+
workspace_start_time = time.time()
167168
export_path = Path(
168169
local_target_path,
169170
self.org_id,
@@ -196,11 +197,24 @@ def _get_workspace_export(
196197
self._store_user_data_filters(
197198
user_data_filters, export_path, workspace_id
198199
)
199-
self.logger.info(f"Stored export for {workspace_id}")
200+
201+
workspace_duration_ms = int(
202+
(time.time() - workspace_start_time) * 1000
203+
)
204+
zip_file_path = f"{self.org_id}/{workspace_id}.zip"
205+
206+
self.logger.info(
207+
f"Completed backup for workspace {workspace_id} "
208+
f"to {zip_file_path} in {workspace_duration_ms}ms"
209+
)
200210
exported = True
201211
except Exception as e:
212+
workspace_duration_ms = int(
213+
(time.time() - workspace_start_time) * 1000
214+
)
202215
self.logger.error(
203-
f"Skipping {workspace_id}. {e.__class__.__name__} encountered: {e}"
216+
f"Skipping {workspace_id} after {workspace_duration_ms}ms. "
217+
f"{e.__class__.__name__} encountered: {e}"
204218
)
205219

206220
if not exported:

0 commit comments

Comments
 (0)