diff --git a/src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java b/src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java index 8d8f276ad99..173b2f6560e 100644 --- a/src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java +++ b/src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java @@ -16,6 +16,7 @@ import org.elasticsearch.action.update.UpdateRequest; import org.elasticsearch.alerts.Alert; import org.elasticsearch.alerts.AlertsStore; import org.elasticsearch.alerts.LoadingListener; +import org.elasticsearch.alerts.plugin.AlertsPlugin; import org.elasticsearch.alerts.triggers.TriggerManager; import org.elasticsearch.alerts.triggers.TriggerResult; import org.elasticsearch.client.Client; @@ -123,7 +124,7 @@ public class AlertActionManager extends AbstractComponent { logger.debug("Stopping thread to read from the job queue"); return; } - threadPool.executor(ThreadPool.Names.MANAGEMENT).execute(new AlertHistoryRunnable(entry)); + threadPool.executor(AlertsPlugin.THREAD_POOL_NAME).execute(new AlertHistoryRunnable(entry)); } } catch (Throwable t) { logger.error("Error during reader thread", t); diff --git a/src/main/java/org/elasticsearch/alerts/plugin/AlertsPlugin.java b/src/main/java/org/elasticsearch/alerts/plugin/AlertsPlugin.java index e289d22780a..8f30de75192 100644 --- a/src/main/java/org/elasticsearch/alerts/plugin/AlertsPlugin.java +++ b/src/main/java/org/elasticsearch/alerts/plugin/AlertsPlugin.java @@ -17,10 +17,10 @@ import static org.elasticsearch.common.settings.ImmutableSettings.settingsBuilde public class AlertsPlugin extends AbstractPlugin { - public static final String NAME = "alerts"; + public static final String THREAD_POOL_NAME = "alerts"; @Override public String name() { - return NAME; + return THREAD_POOL_NAME; } @Override public String description() { @@ -37,7 +37,7 @@ public class AlertsPlugin extends AbstractPlugin { @Override public Settings additionalSettings() { return settingsBuilder() - .put("threadpool."+ NAME + ".type","cached") + .put("threadpool."+ THREAD_POOL_NAME + ".type","cached") .build(); }