-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix missing metadata in messages #15
Fix missing metadata in messages #15
Conversation
…n in config Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
station = self.station | ||
# level, output_format and station are all required fields | ||
for attr in ['level', 'output_format', 'station']: | ||
if not attr in self.metadata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have writte if attr not in self.metadata:
but I guess both do the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah, right @TAlonglong , looks a bit awkward now that you say it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was too late seeing this - merged already. Sorry! I will fix next time if I remember!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We were missing
variant
in output messages. This is now fixed.Also all metadata (except
description
) in the hook is now being added as a dict, like this example (pps_hooks.yaml
):This means it is easier to add new metadata to the message if needed.
Also fixing a couple of bugs from previous PR #13