Skip to content

Commit

Permalink
Merge pull request #115 from lpsinger/timeout
Browse files Browse the repository at this point in the history
Add timeout=1 to consume()
  • Loading branch information
dakota002 authored Aug 13, 2023
2 parents 516e504 + 509e3d3 commit 0236e81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcn_email/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def kafka_message_to_email(message):
def recieve_alerts(consumer):
table = get_email_notification_subscription_table()
while True:
for message in consumer.consume():
for message in consumer.consume(timeout=1):
topic = message.topic()
metrics.received.labels(topic).inc()
recipients = query_and_project_subscribers(table, topic)
Expand Down

0 comments on commit 0236e81

Please sign in to comment.