diff --git a/cmd/icingadb/main.go b/cmd/icingadb/main.go index 857c8379..aabecd10 100644 --- a/cmd/icingadb/main.go +++ b/cmd/icingadb/main.go @@ -2,19 +2,15 @@ package main import ( "context" - "encoding/json" "fmt" "github.com/icinga/icingadb/internal/command" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/flatten" "github.com/icinga/icingadb/pkg/icingadb" "github.com/icinga/icingadb/pkg/icingadb/history" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" "github.com/icinga/icingadb/pkg/icingaredis" - "github.com/icinga/icingadb/pkg/utils" "github.com/pkg/errors" "golang.org/x/sync/errgroup" - "runtime" ) func main() { @@ -55,70 +51,6 @@ func main() { go func() { g, synctx := errgroup.WithContext(hactx) - g.Go(func() error { - return nil - // TODO(el). This code is a draft for trying to synchronize customvar_flat from the customvar - // delta, which actually doesn't really make sense, since both synchronizations must always be - // completed without errors. The synchronization of customar and customvar_flat should only - // fetch the desired entities once and multiplex them to the synchronization of customvar and - // customvar_flat. - delta := s.GetDelta(synctx, v1.NewCustomvar) - if err := delta.Wait(); err != nil { - return err - } - - entities := delta.Create.Entities(synctx) - flat := make(chan contracts.Entity, 0) - - cvg, _ := errgroup.WithContext(synctx) - - g.Go(func() error { - defer close(flat) - - for i := 0; i < 1<