Sennevds / system_sensors

Logging of system sensor specific for the RPI and sending them to a MQTT broker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature request] Call updateSensors immediately at service startup

andystewart999 opened this issue · comments

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

commented

Fixed in latest version