Sleep before reading first sensor
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2d5f22e0e8
commit
e5e025abde
1 changed files with 2 additions and 2 deletions
|
@ -142,6 +142,8 @@ func readSensors(hub *sentry.Hub) {
|
|||
hasReadFailure := false
|
||||
|
||||
for _, sensor := range sensors {
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
t, err := read(sensor.Path)
|
||||
if err != nil {
|
||||
hasReadFailure = true
|
||||
|
@ -171,8 +173,6 @@ func readSensors(hub *sentry.Hub) {
|
|||
Set(tw)
|
||||
|
||||
metrics.TemperatureSensorReadingStatus.WithLabelValues(sensor.Name, "ok").Inc()
|
||||
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
}
|
||||
|
||||
// Throw away reading if any sensor failed
|
||||
|
|
Loading…
Reference in a new issue