[#185] ir: Refactor audit

Resolve funlen linter for processStartAudit method

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
refactoring/OBJECT-3610_node
Dmitrii Stepanov 2023-03-29 17:33:49 +03:00 committed by Gitea
parent 6be2688fb4
commit 30c18d46cc
1 changed files with 5 additions and 2 deletions

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).