But we still need to clear if loading fails

Original commit: elastic/x-pack-elasticsearch@69bf786e81
This commit is contained in:
Martijn van Groningen 2014-11-27 14:07:20 +01:00
parent 385ea45b7c
commit c29e3c9611
2 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,7 @@ public class AlertsStore extends AbstractComponent {
loadAlerts();
} catch (Exception e) {
logger.warn("Failed to load alerts", e);
alertMap.clear();
return false;
}
templateHelper.checkAndUploadIndexTemplate(state, "alerts");

View File

@ -123,6 +123,7 @@ public class AlertActionManager extends AbstractComponent {
loadQueue();
} catch (Exception e) {
logger.error("Unable to load unfinished jobs into the job queue", e);
actionsToBeProcessed.clear();
return false;
}
templateHelper.checkAndUploadIndexTemplate(state, "alerthistory");