From ffe377e05515c5b549c728fd8f65bb55b1489fd8 Mon Sep 17 00:00:00 2001 From: Sean Corrigan Date: Wed, 22 Sep 2021 18:37:11 -0400 Subject: [PATCH] forgot loop --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 3a4d290..4969cf2 100644 --- a/main.py +++ b/main.py @@ -3,6 +3,7 @@ import pythonping from influxdb import InfluxDBClient import json import os +from time import sleep IPs = environ['hosts'] IPs = IPs.replace(' ', '').split(",") @@ -40,4 +41,6 @@ def main(): ## Pull a list from the env variable - Max ~ 2000 IP addresses senddataInflux(ping(IPs)) -main() \ No newline at end of file +while True: + main() + sleep(20) \ No newline at end of file