martinzink commented on a change in pull request #1225:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1225#discussion_r782242215
##########
File path: libminifi/src/c2/C2Agent.cpp
##########
@@ -161,12 +161,9 @@ void C2Agent::configure(const std::shared_ptr<Configure>
&configure, bool reconf
}
if (configure->get("nifi.c2.agent.heartbeat.period",
"c2.agent.heartbeat.period", heartbeat_period)) {
- core::TimeUnit unit;
-
try {
- int64_t schedulingPeriod = 0;
- if (core::Property::StringToTime(heartbeat_period, schedulingPeriod,
unit) && core::Property::ConvertTimeUnitToMS(schedulingPeriod, unit,
schedulingPeriod)) {
- heart_beat_period_ = schedulingPeriod;
+ if (auto heartbeat_period_ms =
utils::timeutils::StringToDuration<std::chrono::milliseconds>(heartbeat_period))
{
+ heart_beat_period_ = heartbeat_period_ms->count();
Review comment:
done
https://github.com/apache/nifi-minifi-cpp/pull/1225/commits/9f0c3752c6a328e005bb22a566eceb406c7fe348
--
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]