[#281] innerring: Create audit context once for one audit round
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
0d7832f5e9
commit
77cf97c236
1 changed files with 3 additions and 3 deletions
|
@ -45,6 +45,9 @@ func (ap *Processor) processStartAudit(epoch uint64) {
|
|||
return
|
||||
}
|
||||
|
||||
var auditCtx context.Context
|
||||
auditCtx, ap.prevAuditCanceler = context.WithCancel(context.Background())
|
||||
|
||||
for i := range containers {
|
||||
cnr, err := ap.containerClient.Get(containers[i]) // get container structure
|
||||
if err != nil {
|
||||
|
@ -79,9 +82,6 @@ func (ap *Processor) processStartAudit(epoch uint64) {
|
|||
zap.Stringer("cid", containers[i]),
|
||||
zap.Int("amount", len(storageGroups)))
|
||||
|
||||
var auditCtx context.Context
|
||||
auditCtx, ap.prevAuditCanceler = context.WithCancel(context.Background())
|
||||
|
||||
auditTask := new(audit.Task).
|
||||
WithReporter(&epochAuditReporter{
|
||||
epoch: epoch,
|
||||
|
|
Loading…
Reference in a new issue