szaszm commented on a change in pull request #1232:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1232#discussion_r781187115
##########
File path: extensions/script/ExecuteScript.h
##########
@@ -28,17 +28,95 @@
#include "ScriptEngine.h"
#include "ScriptProcessContext.h"
+#include "utils/Enum.h"
namespace org {
namespace apache {
namespace nifi {
namespace minifi {
+
+#ifdef PYTHON_SUPPORT
+namespace python {
+class PythonScriptEngine;
+}
+#endif // PYTHON_SUPPORT
+
namespace processors {
+class ScriptEngineFactory {
+ public:
+ ScriptEngineFactory(core::Relationship& success, core::Relationship&
failure, std::shared_ptr<core::logging::Logger> logger);
+
+ template<typename T>
+ std::shared_ptr<T> createEngine() const {
+ auto engine = std::make_shared<T>();
+
+ engine->bind("log", logger_);
+ engine->bind("REL_SUCCESS", success_);
+ engine->bind("REL_FAILURE", failure_);
+
+ return engine;
+ }
+
+ private:
+ core::Relationship& success_;
+ core::Relationship& failure_;
+ std::shared_ptr<core::logging::Logger> logger_;
+};
+
+class ScriptEngineQueue {
+ public:
+ ScriptEngineQueue(uint8_t max_engine_count, ScriptEngineFactory&
engine_factory, std::shared_ptr<core::logging::Logger> logger);
+
+ template<typename T>
+ std::shared_ptr<script::ScriptEngine> getScriptEngine() {
Review comment:
The error of the docker integration test job is related, check it out!
https://github.com/apache/nifi-minifi-cpp/runs/4761689961?check_suite_focus=true#step:4:8518
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]