Skip to content

Commit

Permalink
remove print, fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Oct 1, 2024
1 parent 27b912f commit 7687575
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions wis2box-mqtt-metrics-collector/mqtt_metrics_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ def process_buffered_messages():
message_buffer = []

for topic, msg in messages_to_process:
print(f"Processing message on topic={topic}")
m = json.loads(msg.payload.decode('utf-8'))
if str(topic).startswith('wis2box/stations'):
update_stations_gauge(m['station_list'])
Expand All @@ -190,7 +189,6 @@ def process_buffered_messages():
wsi = m['properties']['wigos_station_identifier']
# if label wsi is not in notify_wsi_total, set to 0 and sleep 5s
if (wsi,) not in notify_wsi_total._metrics:
print(f"wsi={wsi} not in existing WSIs: {[key[0] for key in notify_wsi_total._metrics.keys()]}")
notify_wsi_total.labels(wsi).inc(0)
failure_wsi_total.labels(wsi).inc(0)
station_wsi.labels(wsi).set(1)
Expand Down

0 comments on commit 7687575

Please sign in to comment.