You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/03/01 09:21:51 UTC

[GitHub] [nifi-minifi-cpp] fgerlits commented on a change in pull request #1264: MINIFICPP-1759 Fix linux/libc++ issues, use libc++ on ubuntu

fgerlits commented on a change in pull request #1264:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1264#discussion_r816575049



##########
File path: extensions/standard-processors/processors/GetFile.cpp
##########
@@ -133,7 +130,9 @@ void GetFile::onSchedule(core::ProcessContext *context, core::ProcessSessionFact
     core::Property::StringToInt(value, request_.minSize);
   }
 
-  context->getProperty(PollInterval.getName(), request_.pollInterval);
+  context->getProperty<core::TimePeriodValue>(PollInterval)
+      | utils::map(&core::TimePeriodValue::getMilliseconds)
+      | utils::map([this](std::chrono::milliseconds ms) { request_.pollInterval = ms; });

Review comment:
       this is done elsewhere like this:
   ```suggestion
     if (const auto poll_interval = context->getProperty<core::TimePeriodValue>(PollInterval)) {
         request_.pollInterval = poll_interval->getMilliseconds();
     }
   ```
   which I find more readable




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