blob: 2b317032c52ae9d4f42b25202e32973b4e3ffa97 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.maintenance;
import com.yahoo.vespa.hosted.controller.Application;
import com.yahoo.vespa.hosted.controller.Controller;
import java.time.Duration;
/**
* Deploys application changes which have been postponed due to an ongoing upgrade, or a block window.
*
* @author bratseth
*/
public class OutstandingChangeDeployer extends Maintainer {
public OutstandingChangeDeployer(Controller controller, Duration interval, JobControl jobControl) {
super(controller, interval, jobControl);
}
@Override
protected void maintain() {
for (Application application : controller().applications().asList()) {
if ( application.outstandingChange().isPresent()
&& application.deploymentSpec().canChangeRevisionAt(controller().clock().instant())) {
controller().applications().deploymentTrigger().triggerChange(application.id(),
application.outstandingChange());
}
}
}
}
|