notify payload only
This commit is contained in:
parent
478c0706ab
commit
e12db330a2
2 changed files with 3 additions and 3 deletions
|
@ -20,8 +20,8 @@ log = logging.getLogger(__name__)
|
||||||
|
|
||||||
dbname="lorawan"
|
dbname="lorawan"
|
||||||
|
|
||||||
def db_notify(provider, payload='', deveui=''):
|
def db_notify(provider, payload=''):
|
||||||
notify="{}:{}".format(deveui, payload)
|
notify=payload
|
||||||
log.debug("Notify: {} {}".format(provider, notify))
|
log.debug("Notify: {} {}".format(provider, notify))
|
||||||
try:
|
try:
|
||||||
conn = psycopg2.connect("dbname={}".format(dbname))
|
conn = psycopg2.connect("dbname={}".format(dbname))
|
||||||
|
|
|
@ -31,7 +31,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
# And insert into the db
|
# And insert into the db
|
||||||
lorautil.db_insert_json("ttn", post_data, payload, deveui)
|
lorautil.db_insert_json("ttn", post_data, payload, deveui)
|
||||||
lorautil.db_notify("ttn", post_data, deveui)
|
lorautil.db_notify("ttn", post_data)
|
||||||
|
|
||||||
def payload_hex(self, data):
|
def payload_hex(self, data):
|
||||||
mydict = lorautil.jsonToDict(data)
|
mydict = lorautil.jsonToDict(data)
|
||||||
|
|
Loading…
Reference in a new issue