initial stage

This commit is contained in:
Giambattista Bloisi 2024-03-24 19:07:12 +01:00
parent 921ce0bf48
commit 6b2ef00c25
1 changed files with 2 additions and 2 deletions

View File

@ -132,8 +132,8 @@ def import_EOSC_graph():
for entity in ENTITIES:
keys = hook.list_keys(bucket_name=S3_BUCKET_NAME, prefix=f'{entity}/')
to_delete = list(filter(lambda key: key.endswith('.PROCESSED'), keys))
if len(to_delete) > 0:
hook.delete_objects(bucket=S3_BUCKET_NAME,keys=to_delete)
for obj in to_delete:
hook.delete_objects(bucket=S3_BUCKET_NAME,keys=obj)
for key in keys:
if key.endswith('.gz'):
pieces.append((entity, key))