Skip to content

Commit

Permalink
add =
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelawilkins committed May 4, 2021
1 parent d407872 commit 4b09abc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/sparkapplication/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,14 @@ func shouldRetry(app *v1beta2.SparkApplication) bool {
}
case v1beta2.PendingSubmissionState:
var interval int64 = 257
if app.Spec.Mode != v1beta2.ClusterMode && hasRetryIntervalPassed(&interval, app.Status.SubmissionAttempts, app.CreationTimestamp) && app.Status.SubmissionAttempts < 14 {
if app.Spec.Mode != v1beta2.ClusterMode && hasRetryIntervalPassed(&interval, app.Status.SubmissionAttempts, app.CreationTimestamp) && app.Status.SubmissionAttempts <= 14 {
return true
}
case v1beta2.FailedSubmissionState:
// We retry only if the RestartPolicy is Always. The Submission Job already retries upto the OnSubmissionFailureRetries specified.
if app.Spec.RestartPolicy.Type == v1beta2.Always {
return true
} else if app.Spec.RestartPolicy.Type == v1beta2.OnFailure && app.Status.SubmissionAttempts < 14 {
} else if app.Spec.RestartPolicy.Type == v1beta2.OnFailure && app.Status.SubmissionAttempts <= 14 {

return true
}
Expand Down

0 comments on commit 4b09abc

Please sign in to comment.