lordgamez commented on code in PR #1712:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1712#discussion_r1500602870


##########
extensions/python/ExecutePythonProcessor.cpp:
##########
@@ -44,8 +45,7 @@ void ExecutePythonProcessor::initialize() {
 
   try {
     loadScript();
-  } catch(const std::runtime_error&) {
-    logger_->log_warn("Could not load python script while initializing. In 
case of non-native python processor this is normal and will be done in the 
schedule phase.");

Review Comment:
   Unfortunately the python processors are instantiated twice. We have to 
instantiate the processors defined in the flow, but also we instantiate all 
python processors when building the manifest to get the description and the 
processor properties. In the latter scenario the initialize is called twice, 
once before setting the script file in the `PythonObjectFactory.h` (to 
initialize the supported properties), and in that case the loadScript() will 
always fail, because the ScriptFile property value is not set yet. As this will 
always happen the log is useless here. This double initialization is a bit 
wonky and should be worked out sometime in the future.



-- 
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]

Reply via email to