frostfs-node/pkg/services/audit/taskmanager/reset.go
Leonard Lyubich 2ebcbe70fb [] ir/audit: Make task manager to return number of skipped tasks
Add numeric return from TaskManager.Reset method that shows the number of
canceled tasks. This values will be used for assessment of the progress of
the audit.

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

11 lines
194 B
Go

package audittask
// Reset pops all tasks from the queue.
// Returns amount of popped elements.
func (m *Manager) Reset() (popped int) {
for ; len(m.ch) > 0; popped++ {
<-m.ch
}
return
}