1
0
Fork 0

Use long job RetryBackoff in providers

This commit is contained in:
Emile Vauge 2016-08-19 11:09:54 +02:00
parent 7bb5f9a1e4
commit 97ddfcb17a
No known key found for this signature in database
GPG key ID: D808B4C167352E59
6 changed files with 15 additions and 15 deletions

View file

@ -13,6 +13,7 @@ import (
"github.com/cenkalti/backoff"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"github.com/containous/traefik/utils"
"github.com/gambol99/go-marathon"
"net/http"
"time"
@ -108,7 +109,7 @@ func (provider *Marathon) Provide(configurationChan chan<- types.ConfigMessage,
notify := func(err error, time time.Duration) {
log.Errorf("Marathon 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 Marathon server %+v", err)
}