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