From 87177f8d31e934aa55c3e0ed1761c35a094c9d04 Mon Sep 17 00:00:00 2001 From: ChristophSchranz Date: Mon, 13 Aug 2018 13:17:01 +0200 Subject: [PATCH] Traceback if CM service not accessible --- adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter.py b/adapter.py index 74ddee6..806d79c 100755 --- a/adapter.py +++ b/adapter.py @@ -126,7 +126,7 @@ def publish_sensor_data(data, id_map, topic, ignored=None): 'resultTime': datetime.utcnow().replace(tzinfo=pytz.UTC).isoformat(), 'result': float(data.loc[observation_time, sensor]), 'Datastream': {'@iot.id': id_map[sensor]}} - print(message) + # print(message) producer.send(topic, message, key=str(message['Datastream']['@iot.id']).encode('utf-8')) # block until all messages are sent