Skip to content

Commit

Permalink
fix: print and log
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Nov 29, 2024
1 parent 021719c commit b268612
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
# pylint: disable-all

import json
import logging

import boto3

Expand All @@ -89,6 +90,9 @@ def check_for_pointer_file(S3_APP_BUCKET, S3_APP_KEY):
def construct_db_config(S3_APP_BUCKET, S3_KEY, DB_DATA):
s3 = boto3.client("s3")

print(f'connecting with bucket: "{S3_APP_BUCKET}", key: "{S3_KEY}"')
logging.info(f'connecting with bucket: "{S3_APP_BUCKET}", key: "{S3_KEY}"')

cfg = s3.get_object(Bucket=S3_APP_BUCKET, Key=S3_KEY)

config = json.loads(cfg["Body"].read().decode("utf-8"))
Expand Down

0 comments on commit b268612

Please sign in to comment.