Skip to content

Commit

Permalink
Don't emit error messages as emails
Browse files Browse the repository at this point in the history
Fixes #114.
  • Loading branch information
lpsinger committed Aug 13, 2023
1 parent 0236e81 commit 375dfd1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gcn_email/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def recieve_alerts(consumer):
table = get_email_notification_subscription_table()
while True:
for message in consumer.consume(timeout=1):
error = message.error()
if error is not None:
log.error('Error consuming message: %s', error)
continue
topic = message.topic()
metrics.received.labels(topic).inc()
recipients = query_and_project_subscribers(table, topic)
Expand Down

0 comments on commit 375dfd1

Please sign in to comment.