Fixed type error on variable
This commit is contained in:
parent
d4e9e0581f
commit
ec879c7029
2 changed files with 10 additions and 10 deletions
14
README.md
14
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.
|
||||
|
||||
|
|
6
main.py
6
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)
|
||||
|
|
Loading…
Reference in a new issue