]> average.org Git - tbcncollector.git/commitdiff
Make shorter commit interval
authorEugene Crosser <crosser@average.org>
Fri, 26 Jul 2024 21:36:41 +0000 (23:36 +0200)
committerEugene Crosser <crosser@average.org>
Fri, 26 Jul 2024 21:36:41 +0000 (23:36 +0200)
in the hope that it will allow hourly runs

tbcncollector/__main__.py

index 4b47152d24876b183d0220a5238e85245e4991bd..18b520089bbe1ff318362e8b32319ddcf504a5e2 100644 (file)
@@ -45,7 +45,7 @@ def detection_callback(dev, data):
                             :addr, :batt, :temp, :humid, :time)""",
                     dic)
                 now = time()
-                if now - lastcommit > 100.0:
+                if now - lastcommit > 10.0:
                     db.commit()
                     lastcommit = now