Skip to content

Commit

Permalink
Eliminate flood of debug log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jessemortenson committed Nov 11, 2024
1 parent 7fedbf6 commit fef737e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from django.db import transaction # type: ignore
from openstates.utils.instrument import Instrumentation

env = Env()
env.read_env()

logging.getLogger("botocore").setLevel(logging.WARNING)
logging.getLogger("boto3").setLevel(logging.WARNING)
logging.getLogger("s3transfer").setLevel(logging.WARNING)
Expand All @@ -23,9 +26,6 @@

stats = Instrumentation()

env = Env()
env.read_env()


def process_import_function(event, context):
"""
Expand Down Expand Up @@ -284,11 +284,11 @@ def retrieve_messages_from_queue(delete_after_fetch=True):
sqs.delete_message(
QueueUrl=sqs_url, ReceiptHandle=receipt_handle
)
logger.debug(f"Received and deleted message: {receipt_handle}")
else:
logger.debug(
f"Received message (no deletion): {receipt_handle}"
)
# logger.debug(f"Received and deleted message: {receipt_handle}")
# else:
# logger.debug(
# f"Received message (no deletion): {receipt_handle}"
# )
return message_bodies


Expand Down

0 comments on commit fef737e

Please sign in to comment.