forked from TrueCloudLab/frostfs-node
Evgenii Stratonikov
0e31c12e63
Drop duplicate entities. Format entities. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com> Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
22 lines
545 B
Go
22 lines
545 B
Go
package audit
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func (ap *Processor) handleNewAuditRound(ev event.Event) {
|
|
auditEvent := ev.(Start)
|
|
|
|
epoch := auditEvent.Epoch()
|
|
|
|
ap.log.Info(logs.AuditNewRoundOfAudit, zap.Uint64("epoch", epoch))
|
|
|
|
// send an event to the worker pool
|
|
|
|
err := ap.pool.Submit(func() { ap.processStartAudit(epoch) })
|
|
if err != nil {
|
|
ap.log.Warn(logs.AuditPreviousRoundOfAuditPrepareHasntFinishedYet)
|
|
}
|
|
}
|