Skip to content

Commit

Permalink
Update queue status sentry logging.
Browse files Browse the repository at this point in the history
Only log an error in sentry when the queue status is not healthy.
  • Loading branch information
MattHolmes123 committed May 30, 2022
1 parent 20da9a4 commit 536e831
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mail/libraries/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,4 +405,5 @@ def publish_queue_status():
if "usage_data" in queue_status:
extra_state = {**extra_state, **queue_status["usage_data"]}

log_to_sentry(f"Mail queue status: {queue_state} (see additional data below)", extra=extra_state)
if queue_status != "HEALTHY":
log_to_sentry(f"Mail queue status: {queue_state} (see additional data below)", extra=extra_state)

0 comments on commit 536e831

Please sign in to comment.