Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include igwn notices in JSON loop #175

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gcn_email/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def kafka_message_to_email(message):
maintype="application",
subtype="xml",
)
elif topic.startswith("gcn.notices."):
elif topic.startswith("gcn.notices.") or topic.startswith("igwn."):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that you need to subscribe to the topic as well in subscribe_to_topics.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️ good catch, added in latest commit

valueJson = json.loads(message.value().decode())
replace_long_values(valueJson, 512)
email_message.set_content(json.dumps(valueJson, indent=4))
Expand Down