fgerlits commented on a change in pull request #1126:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1126#discussion_r671041645
##########
File path: extensions/script/python/ExecutePythonProcessor.cpp
##########
@@ -53,79 +53,39 @@ core::Relationship
ExecutePythonProcessor::Success("success", "Script successes"
core::Relationship ExecutePythonProcessor::Failure("failure", "Script
failures");
void ExecutePythonProcessor::initialize() {
- // initialization requires that we do a little leg work prior to onSchedule
- // so that we can provide manifest our processor identity
Review comment:
According to this comment, this double-initialization fudge was an
attempt to make the manifest we send to the C2 in the first heartbeat more
complete. What is the ExecutePythonProcessor section in the manifest going to
look like after this change?
##########
File path: docker/test/integration/resources/python/add_attribute_to_flowfile.py
##########
@@ -0,0 +1,13 @@
+def describe(processor):
+ processor.setDescription("Adds an attribute to your flow files")
+
+
+def onInitialize(processor):
+ processor.setSupportsDynamicProperties()
+
+
+def onTrigger(context, session):
+ flow_file = session.get()
+ if flow_file is not None:
+ flow_file.addAttribute("Python attribute", "attributevalue")
+ session.transfer(flow_file, REL_SUCCESS) # noqa: E128
Review comment:
what is flake8's problem with this line?
--
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]