post_data = post_data.decode()
except AttributeError:
pass
- log.info("This alarm was triggered: %s", json.dumps(post_data))
+ log.info("This alarm was triggered: %s", post_data)
# Send alarm notification to message bus
try:
- self.notify_alarm(json.dumps(post_data))
+ self.notify_alarm(json.loads(post_data))
except Exception:
log.exception("Error notifying alarm")
sev=values['severity'],
date=a_date,
state=values['current'])
- producer.notify_alarm(
+ producer.publish_alarm_response(
'notify_alarm', resp_message)
log.info("Sent alarm notification: %s", resp_message)