DatabasePreparer
This commit is contained in:
@ -5,7 +5,7 @@ import json
|
||||
import datetime
|
||||
|
||||
_parsers = {}
|
||||
|
||||
_seenTopics = {}
|
||||
|
||||
def on_message(client, userdata, msg):
|
||||
try:
|
||||
@ -15,6 +15,9 @@ def on_message(client, userdata, msg):
|
||||
|
||||
global _parsers
|
||||
_parsers[msg.topic].execute(j)
|
||||
|
||||
global _seenTopics
|
||||
_seenTopics[msg.topic] = datetime.datetime.now()
|
||||
except ValueError, e:
|
||||
Logger.log("Exception %s in MqttReceiver, on_message" % (str(e)))
|
||||
|
||||
|
Reference in New Issue
Block a user