[#185] ir: Refactor audit

Resolve funlen linter for processStartAudit method

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-03-29 17:33:49 +03:00 committed by Gitea
parent 6be2688fb4
commit 30c18d46cc

View file

@ -17,7 +17,6 @@ import (
"go.uber.org/zap"
)
// nolint: funlen
func (ap *Processor) processStartAudit(epoch uint64) {
log := ap.log.With(zap.Uint64("epoch", epoch))
@ -52,6 +51,10 @@ func (ap *Processor) processStartAudit(epoch uint64) {
pivot := make([]byte, sha256.Size)
ap.startAuditTasksOnContainers(auditCtx, containers, log, pivot, nm, epoch)
}
func (ap *Processor) startAuditTasksOnContainers(ctx context.Context, containers []cid.ID, log *zap.Logger, pivot []byte, nm *netmap.NetMap, epoch uint64) {
for i := range containers {
cnr, err := cntClient.Get(ap.containerClient, containers[i]) // get container structure
if err != nil {
@ -104,7 +107,7 @@ func (ap *Processor) processStartAudit(epoch uint64) {
epoch: epoch,
rep: ap.reporter,
}).
WithAuditContext(auditCtx).
WithAuditContext(ctx).
WithContainerID(containers[i]).
WithStorageGroupList(storageGroups).
WithContainerStructure(cnr.Value).