[#255] ir: Make audit processor to push tasks to audit task manager

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-22 03:28:42 +03:00 committed by Alex Vanin
parent 580c9c974a
commit 4dc09b19f3
4 changed files with 103 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import (
"github.com/nspcc-dev/neofs-api-go/pkg/container"
"github.com/pkg/errors"
"go.uber.org/zap"
)
var ErrInvalidIRNode = errors.New("node is not in the inner ring list")
@ -18,6 +19,9 @@ func (ap *Processor) selectContainersToAudit(epoch uint64) ([]*container.ID, err
// consider getting extra information about container complexity from
// audit contract there
ap.log.Debug("container listing finished",
zap.Int("total amount", len(containers)),
)
sort.Slice(containers, func(i, j int) bool {
return strings.Compare(containers[i].String(), containers[j].String()) < 0