martinzink commented on code in PR #1926:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1926#discussion_r2000458569
##########
extensions/civetweb/processors/ListenHTTP.cpp:
##########
@@ -39,71 +40,26 @@ void ListenHTTP::initialize() {
}
void ListenHTTP::onSchedule(core::ProcessContext& context,
core::ProcessSessionFactory&) {
- std::string basePath;
+ std::string base_path = context.getProperty(BasePath) |
utils::expect("ListenHTTP::BasePath has default value");
Review Comment:
Good idea,
https://github.com/apache/nifi-minifi-cpp/pull/1926/commits/8d5ced92f87d28700bde2bf9749aadbf11873f5e
##########
extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp:
##########
@@ -45,19 +45,19 @@ void RocksDbStateStorage::onEnable() {
return;
}
- const auto always_persist = getProperty<bool>(AlwaysPersist).value_or(false);
+ const auto always_persist = getProperty(AlwaysPersist.name)
+ | utils::andThen(parsing::parseBool)
+ | utils::expect("RocksDbStateStorage::AlwaysPersist has default value");
logger_->log_info("Always Persist property: {}", always_persist);
- const auto auto_persistence_interval =
getProperty<core::TimePeriodValue>(AutoPersistenceInterval).value_or(core::TimePeriodValue{}).getMilliseconds();
+ const auto auto_persistence_interval =
getProperty(AutoPersistenceInterval.name)
+ | utils::andThen(parsing::parseDuration<std::chrono::milliseconds>)
+ | utils::expect("RocksDbStateStorage::AutoPersistenceInterval has
default value");
Review Comment:
Good idea,
https://github.com/apache/nifi-minifi-cpp/pull/1926/commits/8d5ced92f87d28700bde2bf9749aadbf11873f5e
--
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]