Use long job RetryBackoff in providers
This commit is contained in:
parent
7bb5f9a1e4
commit
97ddfcb17a
6 changed files with 15 additions and 15 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/cenkalti/backoff"
|
||||
"github.com/containous/traefik/safe"
|
||||
"github.com/containous/traefik/types"
|
||||
"github.com/containous/traefik/utils"
|
||||
"github.com/mesos/mesos-go/detector"
|
||||
_ "github.com/mesos/mesos-go/detector/zoo" // Registers the ZK detector
|
||||
"github.com/mesosphere/mesos-dns/detect"
|
||||
|
@ -110,7 +111,7 @@ func (provider *Mesos) Provide(configurationChan chan<- types.ConfigMessage, poo
|
|||
notify := func(err error, time time.Duration) {
|
||||
log.Errorf("mesos connection error %+v, retrying in %s", err, time)
|
||||
}
|
||||
err := backoff.RetryNotify(operation, backoff.NewExponentialBackOff(), notify)
|
||||
err := utils.RetryNotifyJob(operation, backoff.NewExponentialBackOff(), notify)
|
||||
if err != nil {
|
||||
log.Errorf("Cannot connect to mesos server %+v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue