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

More restart policy options and consolidate batch/service restart tracker #594

Merged
merged 10 commits into from
Dec 18, 2015

Conversation

dadgar
Copy link
Contributor

@dadgar dadgar commented Dec 16, 2015

More restart policy options and consolidate batch/service restart tracker

@@ -110,7 +110,7 @@ func (r *AllocRunner) RestoreState() error {
r.restored[name] = struct{}{}

task := &structs.Task{Name: name}
restartTracker := newRestartTracker(r.alloc.Job.Type, r.RestartPolicy)
restartTracker := NewRestartTracker(r.RestartPolicy)
Copy link
Contributor

Choose a reason for hiding this comment

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

should client depend on code from the api package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't from the api package. It is defined in the client package

maxAttempts: restartPolicy.Attempts,
delay: restartPolicy.Delay,
}
func NewRestartTracker(policy *structs.RestartPolicy) *RestartTracker {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be exportable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess not. I can make it private

dadgar added a commit that referenced this pull request Dec 18, 2015
More restart policy options and consolidate batch/service restart tracker
@dadgar dadgar merged commit e410b92 into master Dec 18, 2015
@dadgar dadgar deleted the f-restart-policy branch December 18, 2015 20:25
@github-actions
Copy link

github-actions bot commented May 1, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants