Global DEVICE_ID

This commit is contained in:
Fabio Manganiello 2017-11-03 12:01:20 +01:00
parent 157429cf2b
commit 2837d0df70
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,8 @@ def _exec_func(body, retry=True):
def _on_push(ws, data):
global DEVICE_ID
data = json.loads(data)
if data['type'] == 'tickle' and data['subtype'] == 'push':
logging.debug('Received push tickle')
@ -142,6 +144,8 @@ def on_push(ws, data):
def main():
global DEVICE_ID
DEBUG = False
config_file = curdir + os.sep + 'config.yaml'