Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes #687

Merged
merged 4 commits into from
Sep 27, 2016
Merged

Some fixes #687

merged 4 commits into from
Sep 27, 2016

Conversation

emilevauge
Copy link
Member

Fixes #451

@emilevauge
Copy link
Member Author

ping @containous/traefik

// JobBackOff is an exponential backoff implementation for long running jobs.
// In long running jobs, an operation() that fails after a long Duration should not increments the backoff period.
// If operation() takes more than MinJobInterval, Reset() is called in NextBackOff().
type JobBackOff struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum I'm not sure about the naming of the package (and also the import we to). Shouldn't the package be job (or something like that) and this struct BackOff as an job implem' using a backoff strategie ?
And thus, the import wouldn't need to be aliased below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, import alias would still be needed ẁith backoff.RetryNotify no?

err := backoff.RetryNotify(operation, job.NewJobBackOff(backoff.NewExponentialBackOff()), notify)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no because you're package would be named job

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(instead of backoff currently — which is why you need to do an alias as of this PR)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, fixed :)

@emilevauge emilevauge force-pushed the some-fixes branch 2 times, most recently from d5a1dec to 0e88566 Compare September 21, 2016 14:08
@Russell-IO
Copy link
Contributor

LGTM

@vdemeester vdemeester modified the milestone: 1.1 Sep 23, 2016
Copy link
Contributor

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐸
@emilevauge needs a rebase 👼

@errm
Copy link
Contributor

errm commented Sep 23, 2016

LGTM on rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants