From 44accb735abffd79338b6170b3a2c0868c61f900 Mon Sep 17 00:00:00 2001 From: Christian Heider Nielsen Date: Mon, 27 May 2024 12:40:16 +0200 Subject: [PATCH] as dict --- heimdallr/entry_points/publisher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/heimdallr/entry_points/publisher.py b/heimdallr/entry_points/publisher.py index 25054a2..e2c8f30 100644 --- a/heimdallr/entry_points/publisher.py +++ b/heimdallr/entry_points/publisher.py @@ -103,9 +103,12 @@ def job(): """description""" sensor_data[HOSTNAME]["gpu_stats"] = pull_gpu_info() sensor_data[HOSTNAME]["du_stats"] = pull_disk_usage_info() + + a = sensor_data.as_dict() + assert a is dict client.publish( ALL_CONSTANTS.MQTT_TOPIC, - json.dumps(sensor_data.as_dict()), + json.dumps(a), ALL_CONSTANTS.MQTT_QOS, )