-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
@@ -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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
af5b402
to
5c3e5e7
Compare
maxAttempts: restartPolicy.Attempts, | ||
delay: restartPolicy.Delay, | ||
} | ||
func NewRestartTracker(policy *structs.RestartPolicy) *RestartTracker { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
375af2b
to
95f9339
Compare
More restart policy options and consolidate batch/service restart tracker
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. |
More restart policy options and consolidate batch/service restart tracker