use of com.hubspot.singularity.SingularityDeployResult in project Singularity by HubSpot.
the class SingularitySchedulerTestBase method finishDeploy.
protected void finishDeploy(SingularityDeployMarker marker, SingularityDeploy deploy) {
deployManager.deletePendingDeploy(marker.getRequestId());
deployManager.saveDeployResult(marker, Optional.of(deploy), new SingularityDeployResult(DeployState.SUCCEEDED));
deployManager.saveNewRequestDeployState(new SingularityRequestDeployState(marker.getRequestId(), Optional.of(marker), Optional.<SingularityDeployMarker>absent()));
}
use of com.hubspot.singularity.SingularityDeployResult in project Singularity by HubSpot.
the class DeployManager method getDeployHistory.
public Optional<SingularityDeployHistory> getDeployHistory(String requestId, String deployId, boolean loadEntireHistory) {
Optional<SingularityDeployMarker> deployMarker = getData(getDeployMarkerPath(requestId, deployId), deployMarkerTranscoder);
if (!deployMarker.isPresent()) {
return Optional.absent();
}
Optional<SingularityDeployResult> deployState = getDeployResult(requestId, deployId);
if (!loadEntireHistory) {
return Optional.of(new SingularityDeployHistory(deployState, deployMarker.get(), Optional.<SingularityDeploy>absent(), Optional.<SingularityDeployStatistics>absent()));
}
Optional<SingularityDeploy> deploy = getDeploy(requestId, deployId);
if (!deploy.isPresent()) {
return Optional.absent();
}
Optional<SingularityDeployStatistics> deployStatistics = getDeployStatistics(requestId, deployId);
return Optional.of(new SingularityDeployHistory(deployState, deployMarker.get(), deploy, deployStatistics));
}
Aggregations