This commit is contained in:
Roberto C. Morano 2025-10-21 15:02:25 +02:00 committed by GitHub
commit a11933faa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -325,7 +325,7 @@ def read_basebackups(
backup_prefix = f'{prefix}{pg_cluster}{suffix}/wal/{vp}/basebackups_005/' backup_prefix = f'{prefix}{pg_cluster}{suffix}/wal/{vp}/basebackups_005/'
logger.info(f"{bucket}/{backup_prefix}") logger.info(f"{bucket}/{backup_prefix}")
paginator = client('s3').get_paginator('list_objects_v2') paginator = client('s3', endpoint_url=AWS_ENDPOINT).get_paginator('list_objects_v2')
pages = paginator.paginate(Bucket=bucket, Prefix=backup_prefix) pages = paginator.paginate(Bucket=bucket, Prefix=backup_prefix)
for page in pages: for page in pages:
@ -334,7 +334,7 @@ def read_basebackups(
if not key.endswith("backup_stop_sentinel.json"): if not key.endswith("backup_stop_sentinel.json"):
continue continue
response = client('s3').get_object(Bucket=bucket, Key=key) response = client('s3', endpoint_url=AWS_ENDPOINT).get_object(Bucket=bucket, Key=key)
backup_info = loads(response["Body"].read().decode("utf-8")) backup_info = loads(response["Body"].read().decode("utf-8"))
last_modified = response["LastModified"].astimezone(timezone.utc).isoformat() last_modified = response["LastModified"].astimezone(timezone.utc).isoformat()