fix(pkg/daemon): turn on red rgb-led if something goes wrong in other cases
This commit is contained in:
parent
afd7accb47
commit
f979e88a52
@ -51,8 +51,15 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress
|
||||
for {
|
||||
select {
|
||||
case err, _ := <-errorChannel:
|
||||
err = rgbled.Red(rgbLEDs)
|
||||
if err != nil {
|
||||
logger.Error("Can not turn on red info light: %v", err)
|
||||
}
|
||||
|
||||
logger.Error("%v", err)
|
||||
|
||||
time.Sleep(time.Second * 2)
|
||||
|
||||
case <-ticker:
|
||||
err := rgbled.Blue(rgbLEDs)
|
||||
if err != nil {
|
||||
@ -63,6 +70,12 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress
|
||||
|
||||
err = logfile.AppendTemperatures(temperatureLogfile, compression, temperatureCache)
|
||||
if err != nil {
|
||||
|
||||
err = rgbled.Red(rgbLEDs)
|
||||
if err != nil {
|
||||
logger.Error("Can not turn on red info light: %v", err)
|
||||
}
|
||||
|
||||
cancel()
|
||||
logger.Fatal("Can not save temperatures: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user