breadlysm / SpeedFlux

Script to periodically run the Speedtest CLI application by Ookla and post results to InfluxDB.
MIT License
108 stars 69 forks source link

Merge branch 'feature-influx2' of https://github.com/breadlysm/speedtest-to-influxdb into feature-influx2 #18

Closed breadlysm closed 3 years ago

breadlysm commented 3 years ago

While not completely necessary, I rewrote the config module. This will make for a smoother addition of influx2.

It now functions from a more global scope and is initialized during app startup. This has a few benefits.

  1. Config options are a lot more manageable and easily expanded. Still currently using env variables but now could easily be loaded from a settings file.
  2. Config data is no longer stored in memory. The config settings are always accessed dynamically. (It was bothering me to see full configs in clear text while debugging.)
  3. Cleaner config requests.

Downsides, The config request lines are a bit longer.