From ec879c7029c2c1b249a70fee36df942e7951b19b Mon Sep 17 00:00:00 2001 From: breadlysm Date: Sat, 18 Jul 2020 11:37:29 -0400 Subject: [PATCH] Fixed type error on variable --- README.md | 14 +++++++------- main.py | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 126585f..8b3289e 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ You may want to do this so that you can track your internet connections consiste The InfluxDB connection settings are controlled by environment variables. The variables available are: -INFLUX_DB_ADDRESS = 192.168.1.xxx -INFLUX_DB_PORT = 8086 -INFLUX_DB_USER = user -INFLUX_DB_PASSWORD = pass -INFLUX_DB_DATABASE = speedtest -SPEEDTEST_INTERVAL = 1800 -SPEEDTEST_FAIL_INTERVAL = 300 +- INFLUX_DB_ADDRESS = 192.168.1.xxx +- INFLUX_DB_PORT = 8086 +- INFLUX_DB_USER = user +- INFLUX_DB_PASSWORD = pass +- INFLUX_DB_DATABASE = speedtest +- SPEEDTEST_INTERVAL = 1800 +- SPEEDTEST_FAIL_INTERVAL = 300 Be aware that this script will automatically accept the license and GDPR statement so that it can run non-interactively. Make sure you agree with them before running. diff --git a/main.py b/main.py index 8e5e5b2..48f05cc 100755 --- a/main.py +++ b/main.py @@ -7,14 +7,14 @@ from influxdb import InfluxDBClient # InfluxDB Settings DB_ADDRESS = os.environ.get('INFLUX_DB_ADDRESS') -DB_PORT = os.environ.get('INFLUX_DB_PORT') +DB_PORT = int(os.environ.get('INFLUX_DB_PORT')) DB_USER = os.environ.get('INFLUX_DB_USER') DB_PASSWORD = os.environ.get('INFLUX_DB_PASSWORD') DB_DATABASE = os.environ.get('INFLUX_DB_DATABASE') # Speedtest Settings -TEST_INTERVAL = os.environ.get('SPEEDTEST_INTERVAL') # Time between tests (in seconds). -TEST_FAIL_INTERVAL = os.environ.get('SPEEDTEST_FAIL_INTERVAL') # Time before retrying a failed Speedtest (in seconds). +TEST_INTERVAL = int(os.environ.get('SPEEDTEST_INTERVAL')) # Time between tests (in seconds). +TEST_FAIL_INTERVAL = int(os.environ.get('SPEEDTEST_FAIL_INTERVAL')) # Time before retrying a failed Speedtest (in seconds). influxdb_client = InfluxDBClient( DB_ADDRESS, DB_PORT, DB_USER, DB_PASSWORD, None)