Update TamagotchiService.java

This commit is contained in:
Steinwagner 2019-12-11 11:17:41 +01:00
parent 6ab8fdedc1
commit 2a35e91cdd

View file

@ -87,6 +87,7 @@ public class TamagotchiService {
.forEach(device -> { .forEach(device -> {
deviceRegistry.remove(device.getId()); deviceRegistry.remove(device.getId());
sendTamagotchiDefunctNotifiction(device.getId()); sendTamagotchiDefunctNotifiction(device.getId());
LOGGER.info("{} has died", device.getId());
}); });
} }
@ -112,6 +113,7 @@ public class TamagotchiService {
try { try {
publisherService.publish(m); publisherService.publish(m);
LOGGER.info("defunct notification sent for {}", device.getId());
} catch (Exception ex) { } catch (Exception ex) {
LOGGER.error("sendTamagotchiDefunctNotifiction failed: {}", ex.getMessage()); LOGGER.error("sendTamagotchiDefunctNotifiction failed: {}", ex.getMessage());
} }