You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logging.warn("Using base boto credentials for S3 Dumper")
117
118
self.s3=boto3.resource("s3")
119
+
ifself.delete:
120
+
s3_client=boto3.client(
121
+
"s3",
122
+
aws_access_key_id=access_key,
123
+
aws_secret_access_key=secret_access_key,
124
+
endpoint_url=host,
125
+
)
126
+
res=s3_client.list_objects_v2(
127
+
Bucket=self.bucket_name,
128
+
Prefix=self.prefix,
129
+
)
130
+
if"Contents"inres:
131
+
contents=res["Contents"]
132
+
iflen(contents) >=10:
133
+
raiseException(
134
+
f"Throwing an error from the dump_to_s3 processor because the number of files to be deleted was more than 10. This is a safety measure to ensure we don't accidently more files than expected."
0 commit comments