forked from TrueCloudLab/frostfs-node
[#965] replicator: Make HandleTask function public
Continues replication executed in separate pool of goroutines, so there is no need in worker to handle replication tasks asynchronously. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
a74a402a7d
commit
011d0f605b
2 changed files with 4 additions and 3 deletions
|
@ -37,12 +37,13 @@ func (p *Replicator) Run(ctx context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
p.handleTask(ctx, task)
|
||||
p.HandleTask(ctx, task)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Replicator) handleTask(ctx context.Context, task *Task) {
|
||||
// HandleTask executes replication task inside invoking goroutine.
|
||||
func (p *Replicator) HandleTask(ctx context.Context, task *Task) {
|
||||
defer func() {
|
||||
p.log.Info("finish work",
|
||||
zap.Uint32("amount of unfinished replicas", task.quantity),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue