forked from Ivasoft/traefik
Use long job RetryBackoff in providers
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/cenkalti/backoff"
|
||||
"github.com/containous/traefik/safe"
|
||||
"github.com/containous/traefik/types"
|
||||
"github.com/containous/traefik/utils"
|
||||
"github.com/containous/traefik/version"
|
||||
"github.com/docker/engine-api/client"
|
||||
dockertypes "github.com/docker/engine-api/types"
|
||||
@@ -139,7 +140,7 @@ func (provider *Docker) Provide(configurationChan chan<- types.ConfigMessage, po
|
||||
notify := func(err error, time time.Duration) {
|
||||
log.Errorf("Docker 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 docker server %+v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user