lordgamez commented on code in PR #1863:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1863#discussion_r1827734883
##########
extensions/python/types/PyProcessSession.h:
##########
@@ -39,10 +39,11 @@ class PyProcessSession {
void remove(const std::shared_ptr<core::FlowFile>& flow_file);
std::string getContentsAsString(const std::shared_ptr<core::FlowFile>&
flow_file);
void putAttribute(const std::shared_ptr<core::FlowFile>& flow_file,
std::string_view key, const std::string& value);
+ core::ProcessSession& getSession() const { return session_; }
private:
std::vector<std::shared_ptr<core::FlowFile>> flow_files_;
- gsl::not_null<core::ProcessSession*> session_;
+ core::ProcessSession& session_;
Review Comment:
I think in this case our goal is not to allow move or reassignment as the
session member should be the same for the lifetime of the `PyProcessSession`
object. This is consistent with the `LuaProcessSession` where the session
member is also a reference. I would keep this change due to this.
--
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]