Skip to content

Commit 5af89e2

Browse files
log: remove
1 parent 60beb71 commit 5af89e2

File tree

1 file changed

+12
-14
lines changed
  • services/storage/src/simcore_service_storage/modules

1 file changed

+12
-14
lines changed

services/storage/src/simcore_service_storage/modules/s3.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from common_library.json_serialization import json_dumps
88
from fastapi import FastAPI
99
from pydantic import TypeAdapter
10-
from servicelib.logging_utils import log_context
1110
from tenacity import retry, wait_random_exponential
1211
from tenacity.asyncio import AsyncRetrying
1312
from tenacity.before_sleep import before_sleep_log
@@ -29,20 +28,19 @@
2928
async def _ensure_s3_bucket(
3029
client: SimcoreS3API, settings: ApplicationSettings
3130
) -> None:
32-
with log_context(_logger, logging.DEBUG, msg="setup.s3_bucket.cleanup_ctx"):
33-
assert settings.STORAGE_S3 # nosec
34-
if await client.bucket_exists(bucket=settings.STORAGE_S3.S3_BUCKET_NAME):
35-
_logger.info(
36-
"S3 bucket %s exists already, skipping creation",
37-
settings.STORAGE_S3.S3_BUCKET_NAME,
38-
)
39-
return
40-
await client.create_bucket(
41-
bucket=settings.STORAGE_S3.S3_BUCKET_NAME,
42-
region=TypeAdapter(
43-
BucketLocationConstraintType | Literal["us-east-1"]
44-
).validate_python(settings.STORAGE_S3.S3_REGION),
31+
assert settings.STORAGE_S3 # nosec
32+
if await client.bucket_exists(bucket=settings.STORAGE_S3.S3_BUCKET_NAME):
33+
_logger.info(
34+
"S3 bucket %s exists already, skipping creation",
35+
settings.STORAGE_S3.S3_BUCKET_NAME,
4536
)
37+
return
38+
await client.create_bucket(
39+
bucket=settings.STORAGE_S3.S3_BUCKET_NAME,
40+
region=TypeAdapter(
41+
BucketLocationConstraintType | Literal["us-east-1"]
42+
).validate_python(settings.STORAGE_S3.S3_REGION),
43+
)
4644

4745

4846
def setup_s3(app: FastAPI) -> None:

0 commit comments

Comments
 (0)