Browse Source

One must refresh the data before requesting it

Christopher Nethercott 3 years ago
parent
commit
1c08a8f1ff
1 changed files with 1 additions and 0 deletions
  1. 1 0
      main.py

+ 1 - 0
main.py

@@ -69,6 +69,7 @@ def main():
     init_db()
     init_db()
 
 
     while(1):
     while(1):
+        pihole.refresh()
         data = get_data_for_influxdb()
         data = get_data_for_influxdb()
         if influxdb_client.write_points(data) == True:
         if influxdb_client.write_points(data) == True:
             print("{} - Data written to DB successfully".format(datetime.datetime.now()))
             print("{} - Data written to DB successfully".format(datetime.datetime.now()))