frostfs-node/pkg/services/audit/taskmanager/reset.go
Leonard Lyubich 76d4e53ea0 [#255] services/audit: Skip all tasks from previous epoch in audit processor
Implement Reset method on audit task manager that cleans task queue.
Extended TaskManager interface with Reset method on IR side. Call Reset
method in audit processor before new audit start.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:49:27 +03:00

8 lines
122 B
Go

package audittask
// Reset pops all tasks from the queue.
func (m *Manager) Reset() {
for len(m.ch) > 0 {
<-m.ch
}
}