mattyb149 commented on a change in pull request #5116:
URL: https://github.com/apache/nifi/pull/5116#discussion_r645878547
##########
File path:
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/rules/handlers/script/ScriptedActionHandler.java
##########
@@ -110,23 +101,26 @@ protected boolean reloadScript(final String scriptBody) {
final Collection<ValidationResult> results = new HashSet<>();
try {
+ // Create a single script engine, the Processor object is reused
by each task
+ if (scriptRunner == null) {
+ scriptingComponentHelper.setupScriptRunners(1, scriptBody,
getLogger());
+ scriptRunner = scriptingComponentHelper.scriptRunnerQ.poll();
+ }
+
+ if (scriptRunner == null) {
+ throw new ProcessException("No script engine available!");
Review comment:
Probably, I'll search-and-replace these
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]