Sennevds / system_sensors

Logging of system sensor specific for the RPI and sending them to a MQTT broker
MIT License
362 stars 112 forks source link

[Feature request] Call updateSensors immediately at service startup #94

Closed andystewart999 closed 3 years ago

andystewart999 commented 3 years ago

Hi there - first of all, this is a fantastic project, and I love that you keep updating it.

I've been making my own changes internally and during development it was a bit tedious waiting for 300 seconds (my update interval) each time I restarted the service to test changes.

So I added updateSensors() immediately before the job creation line... perhaps that change would be helpful to others if it was baked in?

    updateSensors()
    job = Job(interval=timedelta(seconds=WAIT_TIME_SECONDS), execute=updateSensors)
    job.start()
    mqttClient.loop_forever()

Thanks again, Andy

Sennevds commented 3 years ago

Fixed in latest version