fix(pkg/daemon): compression and rounding
This commit is contained in:
parent
25dd99cd3d
commit
afe55b3d33
@ -11,6 +11,7 @@ import (
|
||||
"github.com/go-flucky/flucky/pkg/config"
|
||||
"github.com/go-flucky/flucky/pkg/rgbled"
|
||||
"github.com/go-flucky/flucky/pkg/sensor"
|
||||
"github.com/go-flucky/flucky/pkg/storage"
|
||||
"github.com/go-flucky/flucky/pkg/storage/db"
|
||||
"github.com/go-flucky/flucky/pkg/storage/logfile"
|
||||
"github.com/go-flucky/flucky/pkg/types"
|
||||
@ -102,6 +103,14 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress
|
||||
flogger.Error("Can not turn on blue info light: %v", err)
|
||||
}
|
||||
|
||||
if round != 0 {
|
||||
storage.Round(measuredValuesCache, round)
|
||||
}
|
||||
|
||||
if compression {
|
||||
measuredValuesCache = storage.Compression(measuredValuesCache)
|
||||
}
|
||||
|
||||
if err := logfile.Append(measuredValuesLogfile, measuredValuesCache); err != nil {
|
||||
err2 := rgbled.Error(rgbLEDs)
|
||||
if err2 != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user