You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "lordgamez (via GitHub)" <gi...@apache.org> on 2024/11/04 13:30:10 UTC

Re: [PR] MINIFICPP-2279 Add support for RecordTransform NiFi python processors [nifi-minifi-cpp]

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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org