Skip to content

Commit

Permalink
Traceback if CM service not accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophSchranz committed Aug 13, 2018
1 parent 7c5ebe6 commit 87177f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 87177f8

Please sign in to comment.