forked from TrueCloudLab/frostfs-node
[#185] ir: Refactor audit
Resolve funlen linter for processStartAudit method Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6be2688fb4
commit
30c18d46cc
1 changed files with 5 additions and 2 deletions
|
@ -17,7 +17,6 @@ import (
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
// nolint: funlen
|
|
||||||
func (ap *Processor) processStartAudit(epoch uint64) {
|
func (ap *Processor) processStartAudit(epoch uint64) {
|
||||||
log := ap.log.With(zap.Uint64("epoch", epoch))
|
log := ap.log.With(zap.Uint64("epoch", epoch))
|
||||||
|
|
||||||
|
@ -52,6 +51,10 @@ func (ap *Processor) processStartAudit(epoch uint64) {
|
||||||
|
|
||||||
pivot := make([]byte, sha256.Size)
|
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 {
|
for i := range containers {
|
||||||
cnr, err := cntClient.Get(ap.containerClient, containers[i]) // get container structure
|
cnr, err := cntClient.Get(ap.containerClient, containers[i]) // get container structure
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -104,7 +107,7 @@ func (ap *Processor) processStartAudit(epoch uint64) {
|
||||||
epoch: epoch,
|
epoch: epoch,
|
||||||
rep: ap.reporter,
|
rep: ap.reporter,
|
||||||
}).
|
}).
|
||||||
WithAuditContext(auditCtx).
|
WithAuditContext(ctx).
|
||||||
WithContainerID(containers[i]).
|
WithContainerID(containers[i]).
|
||||||
WithStorageGroupList(storageGroups).
|
WithStorageGroupList(storageGroups).
|
||||||
WithContainerStructure(cnr.Value).
|
WithContainerStructure(cnr.Value).
|
||||||
|
|
Loading…
Reference in a new issue