martinzink commented on a change in pull request #1225:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1225#discussion_r769576283



##########
File path: extensions/libarchive/BinFiles.cpp
##########
@@ -118,13 +118,9 @@ void BinFiles::onSchedule(core::ProcessContext *context, 
core::ProcessSessionFac
   if (context->getProperty(MaxBinCount.getName(), maxBinCount_)) {
     logger_->log_debug("BinFiles: MaxBinCount [%" PRIu32 "]", maxBinCount_);
   }
-  std::string maxBinAgeStr;
-  if (context->getProperty(MaxBinAge.getName(), maxBinAgeStr)) {
-    core::TimeUnit unit;
-    if (core::Property::StringToTime(maxBinAgeStr, val64, unit) && 
core::Property::ConvertTimeUnitToMS(val64, unit, val64)) {
-      this->binManager_.setBinAge(val64);
-      logger_->log_debug("BinFiles: MaxBinAge [%" PRIu64 "]", val64);
-    }
+  if (auto max_bin_age = 
context->getProperty<core::TimePeriodValue>(MaxBinAge)) {
+    this->binManager_.setBinAge(max_bin_age->getMilliseconds());
+    logger_->log_debug("BinFiles: MaxBinAge [%" PRIu64 "]", val64);

Review comment:
       fixed in 
https://github.com/martinzink/nifi-minifi-cpp/commit/78f8658fde802c73a5965dd734a544acbc37dca3#diff-8437e347b195a4944072645eb29b284c9575430a08c714d7cbb9115a86933315R123




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


Reply via email to