[#1731] services/replicator: Unify Task interface with other parameters

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-09-19 14:01:19 +03:00 committed by fyrchik
parent 4e043a801c
commit 898689ec14
4 changed files with 24 additions and 40 deletions

View file

@ -19,7 +19,7 @@ type TaskResult interface {
// HandleTask executes replication task inside invoking goroutine.
// Passes all the nodes that accepted the replication to the TaskResult.
func (p *Replicator) HandleTask(ctx context.Context, task *Task, res TaskResult) {
func (p *Replicator) HandleTask(ctx context.Context, task Task, res TaskResult) {
defer func() {
p.log.Debug("finish work",
zap.Uint32("amount of unfinished replicas", task.quantity),