Skip to content

Commit

Permalink
info on current object metadata only if dataframe not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
davedavemckay committed Oct 29, 2024
1 parent b8f7995 commit 7d0f27f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions csd3-side/scripts/lsst-backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,9 +1308,10 @@ def error(self, message):
current_objects = pd.DataFrame.from_dict({'CURRENT_OBJECTS':current_objects})

print(f'Current objects (with matching prefix): {len(current_objects)}', flush=True)
print(f"Current objects (with matching prefix; excluding collated zips): {len(current_objects[current_objects['CURRENT_OBJECTS'].str.contains('collated_') == False])}", flush=True)

if not current_objects.empty:
print('Obtaining current object metadata.')
print(f"Current objects (with matching prefix; excluding collated zips): {len(current_objects[current_objects['CURRENT_OBJECTS'].str.contains('collated_') == False])}", flush=True)
print('Obtaining current object metadata.', flush=True)
current_objects['METADATA'] = current_objects['CURRENT_OBJECTS'].apply(find_metadata, bucket=bucket)
print()
else:
Expand Down

0 comments on commit 7d0f27f

Please sign in to comment.