mirror of
https://github.com/zrepl/zrepl.git
synced 2025-06-25 04:01:49 +02:00
parent
91c4a97f72
commit
59e34942d1
@ -148,10 +148,10 @@ outer:
|
|||||||
log := pullCtx.Value(contextKeyLog).(Logger)
|
log := pullCtx.Value(contextKeyLog).(Logger)
|
||||||
log.Debug("replicating from lhs to rhs")
|
log.Debug("replicating from lhs to rhs")
|
||||||
puller := Puller{j.replTask, local, log, j.Mapping, j.InitialReplPolicy}
|
puller := Puller{j.replTask, local, log, j.Mapping, j.InitialReplPolicy}
|
||||||
if err := puller.doPull(); err != nil {
|
if err := puller.Pull(); err != nil {
|
||||||
log.WithError(err).Error("error replicating lhs to rhs")
|
log.WithError(err).Error("error replicating lhs to rhs")
|
||||||
}
|
}
|
||||||
// use a ctx as soon as doPull gains ctx support
|
// use a ctx as soon as Pull gains ctx support
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
break outer
|
break outer
|
||||||
|
@ -125,7 +125,7 @@ start:
|
|||||||
|
|
||||||
pullLog := log.WithField(logTaskField, "pull")
|
pullLog := log.WithField(logTaskField, "pull")
|
||||||
puller := Puller{j.task, client, pullLog, j.Mapping, j.InitialReplPolicy}
|
puller := Puller{j.task, client, pullLog, j.Mapping, j.InitialReplPolicy}
|
||||||
if err = puller.doPull(); err != nil {
|
if err = puller.Pull(); err != nil {
|
||||||
log.WithError(err).Error("error doing pull")
|
log.WithError(err).Error("error doing pull")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ type Puller struct {
|
|||||||
InitialReplPolicy InitialReplPolicy
|
InitialReplPolicy InitialReplPolicy
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pull *Puller) doPull() (err error) {
|
func (pull *Puller) Pull() (err error) {
|
||||||
|
|
||||||
remote := pull.Remote
|
remote := pull.Remote
|
||||||
log := pull.Log
|
log := pull.Log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user