I said I didn't like this code duplication >_<
@@ -181,8 +181,7 @@ public class DeploymentApiHandler extends LoggingRequestHandler {
/** The last triggered upgrade to this version, for this application */
private Optional<JobStatus> lastDeployingTo(Version version, Application application) {
return JobList.from(application)
- .running(controller.applications().deploymentTrigger().jobTimeoutLimit())
- .lastTriggered().upgrade()
+ .upgrading()
.asList().stream()
.max(comparing(job -> job.lastTriggered().get().at()));
}
