Backport of #62655
This commit is contained in:
parent
8ca33feffd
commit
8d69334c2f
|
@ -51,6 +51,7 @@ import org.elasticsearch.plugins.SystemIndexPlugin;
|
|||
import org.elasticsearch.repositories.RepositoriesService;
|
||||
import org.elasticsearch.rest.RestController;
|
||||
import org.elasticsearch.rest.RestHandler;
|
||||
import org.elasticsearch.script.ScriptCache;
|
||||
import org.elasticsearch.script.ScriptContext;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.script.TemplateScript;
|
||||
|
@ -225,7 +226,8 @@ public class Watcher extends Plugin implements SystemIndexPlugin, ScriptPlugin,
|
|||
new ByteSizeValue(1, ByteSizeUnit.MB), new ByteSizeValue(10, ByteSizeUnit.MB), NodeScope);
|
||||
|
||||
public static final ScriptContext<TemplateScript.Factory> SCRIPT_TEMPLATE_CONTEXT
|
||||
= new ScriptContext<>("xpack_template", TemplateScript.Factory.class);
|
||||
= new ScriptContext<>("xpack_template", TemplateScript.Factory.class,
|
||||
200, TimeValue.timeValueMillis(0), ScriptCache.UNLIMITED_COMPILATION_RATE.asTuple());
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(Watcher.class);
|
||||
private WatcherIndexingListener listener;
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.watcher.condition;
|
||||
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.script.ScriptCache;
|
||||
import org.elasticsearch.script.ScriptContext;
|
||||
import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext;
|
||||
import org.elasticsearch.xpack.watcher.support.Variables;
|
||||
|
@ -41,5 +43,6 @@ public abstract class WatcherConditionScript {
|
|||
WatcherConditionScript newInstance(Map<String, Object> params, WatchExecutionContext watcherContext);
|
||||
}
|
||||
|
||||
public static ScriptContext<Factory> CONTEXT = new ScriptContext<>("watcher_condition", Factory.class);
|
||||
public static ScriptContext<Factory> CONTEXT = new ScriptContext<>("watcher_condition", Factory.class,
|
||||
200, TimeValue.timeValueMillis(0), ScriptCache.UNLIMITED_COMPILATION_RATE.asTuple());
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.watcher.transform.script;
|
||||
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.script.ScriptCache;
|
||||
import org.elasticsearch.script.ScriptContext;
|
||||
import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext;
|
||||
import org.elasticsearch.xpack.core.watcher.watch.Payload;
|
||||
|
@ -42,5 +44,6 @@ public abstract class WatcherTransformScript {
|
|||
WatcherTransformScript newInstance(Map<String, Object> params, WatchExecutionContext watcherContext, Payload payload);
|
||||
}
|
||||
|
||||
public static ScriptContext<Factory> CONTEXT = new ScriptContext<>("watcher_transform", Factory.class);
|
||||
public static ScriptContext<Factory> CONTEXT = new ScriptContext<>("watcher_transform", Factory.class,
|
||||
200, TimeValue.timeValueMillis(0), ScriptCache.UNLIMITED_COMPILATION_RATE.asTuple());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue