- LOG.debug("Got message at %s: %s" % (last_update, message['message']))
- if last_run > message.get('timestamp', 0):
+ timestamp = last_update
+ try:
+ message = json.loads(message)
+ except ValueError:
+ pass
+
+ if isinstance(message, dict):
+ timestamp = message.get('timestamp', last_update)
+ message = message.get('message', 'update required')
+ LOG.debug("Got message at %s: %s" % (last_update, message))
+ if last_run > timestamp: