Skip to content

Commit

Permalink
Fixed IS_DEBUG env
Browse files Browse the repository at this point in the history
  • Loading branch information
niemijoe committed Aug 9, 2022
1 parent 513dd94 commit 8b3ac91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mqtt_data_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
IS_DEBUG = os.getenv('IS_DEBUG')

# How long to listen to the topics until we send data to Azure. Should be 60 in production
MONITOR_PERIOD_IN_SECONDS = 60 if IS_DEBUG == False else 3
MONITOR_PERIOD_IN_SECONDS = 60 if IS_DEBUG == "False" else 3

def main():
"""
Expand Down Expand Up @@ -53,11 +53,11 @@ def listen_topic_thread(topic_data_string):
for i in range(len(threads)):
threads[i].join()

if IS_DEBUG == False:
if IS_DEBUG == "True":
print(topic_data_collection)
else:
send_mqtt_msg_count_into_azure(topic_data_collection)
print(f'Mqtt metrics sent: {datetime.now().strftime("%Y-%m-%dT%H:%M:%S")}')
else:
print(topic_data_collection)

def listen_topic(topic_data_collection, address, topic, port):
"""
Expand Down

0 comments on commit 8b3ac91

Please sign in to comment.