use of com.sequenceiq.cloudbreak.reactor.api.event.orchestration.SetupRecoverySuccess in project cloudbreak by hortonworks.
the class RecoverySetupHandler method doAccept.
@Override
protected Selectable doAccept(HandlerEvent<SetupRecoveryRequest> event) {
Long stackId = event.getData().getResourceId();
try {
if (event.getData().getProvisionType() == ProvisionType.RECOVERY) {
LOGGER.debug("Provision type is recovery, so running recovery setup state.");
rdsRecoverySetupService.addRecoverRole(stackId);
} else {
LOGGER.debug("Provision type is not recovery, skipping recovery specific logic..");
}
return new SetupRecoverySuccess(stackId);
} catch (Exception e) {
LOGGER.error("Recovery setup failed", e);
return new SetupRecoveryFailed(stackId, e);
}
}
Aggregations