lordgamez commented on a change in pull request #1232:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1232#discussion_r781226221
##########
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:
My bad I didn't have the LUA_SUPPORT flag enabled when compiled locally,
the compilation issues should be fixed in
9c96d09addaa6516382a2d171f002e14f4151099
--
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]