use of org.bf2.srs.fleetmanager.storage.RegistryStorageConflictException in project srs-fleet-manager by bf2fc6cc711aee1a0c2a.
the class ScheduleRegistryWorker method finallyExecute.
@Override
public void finallyExecute(Task aTask, WorkerContext ctl, Optional<Exception> error) throws RegistryNotFoundException, RegistryStorageConflictException {
ScheduleRegistryTask task = (ScheduleRegistryTask) aTask;
// SUCCESS STATE
Optional<RegistryData> registryOpt = storage.getRegistryById(task.getRegistryId());
if (registryOpt.isPresent() && registryOpt.get().getRegistryDeployment() != null)
return;
// The only thing to handle is if we were able to schedule but storage does not work
// In that case, the only thing to do is to just try deleting the registry.
storage.deleteRegistry(task.getRegistryId());
}
Aggregations