Skip to content

Commit

Permalink
Fixing iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
kylevillegas93 committed Jan 2, 2025
1 parent eef40f3 commit 7ae52ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions processes/file/fulfill_url_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ def fetch_and_update_manifests(self, start_timestamp=None):
#Using JMESPath to extract keys from the JSON batches
filtered_batch_keys = batches.search(f"Contents[?to_string(LastModified) > '\"{start_timestamp}\"'].Key")
for key in filtered_batch_keys:
if not key:
continue

metadata_object = self.s3_manager.s3Client.get_object(Bucket=self.s3_bucket, Key=f'{key}')
self.update_metadata_object(metadata_object, self.s3_bucket, key)
else:
for batch in batches:
if 'Content' not in batch:
continue

for content in batch['Contents']:
key = content['Key']
metadata_object = self.s3_manager.s3Client.get_object(Bucket=self.s3_bucket, Key=f'{key}')
Expand Down

0 comments on commit 7ae52ad

Please sign in to comment.