Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Sep 30, 2024
1 parent 9da33ef commit 7a08b43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wis2box-mqtt-metrics-collector/mqtt_metrics_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def sub_mqtt_metrics(client, userdata, msg):


def process_buffered_messages():
logger.info("Processing buffered messages")
global message_buffer

with buffer_lock:
Expand Down Expand Up @@ -214,6 +215,7 @@ def process_buffered_messages():

# Call this function periodically, e.g., in a separate thread
def periodic_buffer_processing():
logger.info("Starting periodic buffer processing")
while True:
process_buffered_messages()
time.sleep(5) # Adjust sleep time as needed
Expand Down

0 comments on commit 7a08b43

Please sign in to comment.