bakaid commented on a change in pull request #672: MINIFICPP-1043 - FetchOPC 
should support reporting changes only
URL: https://github.com/apache/nifi-minifi-cpp/pull/672#discussion_r342453167
 
 

 ##########
 File path: extensions/opc/src/fetchopc.cpp
 ##########
 @@ -194,11 +204,25 @@ namespace processors {
     {
       try {
         opc::NodeData nodedata = connection_->getNodeData(ref);
-        OPCData2FlowFile(nodedata, context, session);
-        variablesFound_++;
+        bool write = true;
+        if (lazy_mode_) {
+          write = false;
+          std::string nodeid = nodedata.attributes["Full path"];
+          std::string cur_timestamp = node_timestamp_[nodeid];
+          std::string new_timestamp = nodedata.attributes["Sourcetimestamp"];
+          if (cur_timestamp != new_timestamp) {
+            node_timestamp_[nodeid] = new_timestamp;
+            logger_->log_warn("Node %s has new source timestamp %s", nodeid, 
new_timestamp);
 
 Review comment:
   I think a warning level log is excessive here, as this is a normal code 
path. I would leave it at max on info, but if it spams too much even debug.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to