Global DEVICE_ID

This commit is contained in:
Fabio Manganiello 2017-11-03 12:01:20 +01:00
parent 157429cf2b
commit 2837d0df70

View file

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