Skip to content

Commit 2a0e5be

Browse files
committed
changes accompanying result model change
1 parent d5e4cac commit 2a0e5be

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/aibs_informatics_aws_lambda/handlers/data_sync/operations.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ def handle(self, request: BatchDataSyncRequest) -> BatchDataSyncResponse:
139139
f"[{i+1}/{len(batch_requests)}] "
140140
f"Syncing content from {_.source_path} to {_.destination_path}"
141141
)
142-
batch_result.total_requests_count += 1
143142
try:
144143
result = sync_operations.sync(
145144
source_path=_.source_path,
@@ -150,12 +149,12 @@ def handle(self, request: BatchDataSyncRequest) -> BatchDataSyncResponse:
150149
batch_result.add_bytes_transferred(result.bytes_transferred)
151150
if result.files_transferred is not None:
152151
batch_result.add_files_transferred(result.files_transferred)
153-
batch_result.successful_requests_count += 1
152+
batch_result.increment_successful_requests_count()
154153

155154
if result.bytes_transferred:
156155
result.add_bytes_transferred(result.bytes_transferred)
157156
except Exception as e:
158-
batch_result.failed_requests_count += 1
157+
batch_result.increment_failed_requests_count()
159158
response.add_failed_request(_)
160159
self.logger.error(
161160
f"Failed to sync content from {_.source_path} to {_.destination_path}"

0 commit comments

Comments
 (0)