use of org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesMachineImpl.MachineId in project che-server by eclipse-che.
the class JpaKubernetesMachineCache method doUpdateMachineStatus.
@Transactional
protected void doUpdateMachineStatus(String workspaceId, String machineName, MachineStatus status) throws InfrastructureException {
EntityManager entityManager = managerProvider.get();
KubernetesMachineImpl machine = entityManager.find(KubernetesMachineImpl.class, new MachineId(workspaceId, machineName));
if (machine == null) {
throw new InfrastructureException(format("Machine '%s:%s' was not found", workspaceId, machineName));
}
machine.setStatus(status);
entityManager.flush();
}
use of org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesMachineImpl.MachineId in project devspaces-images by redhat-developer.
the class JpaKubernetesMachineCache method doUpdateMachineStatus.
@Transactional
protected void doUpdateMachineStatus(String workspaceId, String machineName, MachineStatus status) throws InfrastructureException {
EntityManager entityManager = managerProvider.get();
KubernetesMachineImpl machine = entityManager.find(KubernetesMachineImpl.class, new MachineId(workspaceId, machineName));
if (machine == null) {
throw new InfrastructureException(format("Machine '%s:%s' was not found", workspaceId, machineName));
}
machine.setStatus(status);
entityManager.flush();
}
Aggregations