Skip to content

Commit

Permalink
* Enable Service.autoRestart functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Apr 12, 2016
1 parent cbf325e commit a3e239a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ func (instance *Execution) checkAfterExecutionStates(target *service.Execution,
doRestart = true
respectDelay = false
} else if target.Service().Config().SuccessExitCodes.Contains(exitCode) {
doRestart = target.Service().Config().CronExpression.IsEnabled() && instance.masterExitCode == nil
doRestart = (target.Service().Config().CronExpression.IsEnabled() && instance.masterExitCode == nil) || target.Service().Config().AutoRestart.OnSuccess()
} else {
doRestart = true
doRestart = target.Service().Config().AutoRestart.OnFailures()
respectDelay = true
}
return doRestart, respectDelay
Expand Down

0 comments on commit a3e239a

Please sign in to comment.