diff --git a/pkg/daemon/daemon.go b/pkg/daemon/daemon.go index c3292a8..2c5100d 100644 --- a/pkg/daemon/daemon.go +++ b/pkg/daemon/daemon.go @@ -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 {