Send notifications even if an error occurred during monitoring process
@@ -71,10 +71,13 @@ public class VMMonitor {
}
public void monitor() {
+ try {
ListUtils.emptyIfNull(apiClient.loadRegions())
.forEach(this::checkVMs);
+ } finally {
notifier.sendNotifications();
}
+ }
@SuppressWarnings("unchecked")
private void checkVMs(final AbstractCloudRegion region) {
