martinzink commented on code in PR #1581:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1581#discussion_r1214604135
##########
libminifi/src/TimerDrivenSchedulingAgent.cpp:
##########
@@ -28,11 +28,13 @@ namespace org::apache::nifi::minifi {
utils::TaskRescheduleInfo TimerDrivenSchedulingAgent::run(core::Processor*
processor, const std::shared_ptr<core::ProcessContext> &processContext,
const
std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) {
if (this->running_ && processor->isRunning()) {
+ auto trigger_start_time = std::chrono::steady_clock::now();
this->onTrigger(processor, processContext, sessionFactory);
if (processor->isYield())
return utils::TaskRescheduleInfo::RetryIn(processor->getYieldTime());
- return
utils::TaskRescheduleInfo::RetryIn(std::chrono::duration_cast<std::chrono::milliseconds>(processor->getSchedulingPeriodNano()));
+ auto next_execution_time_point = trigger_start_time +
processor->getSchedulingPeriod();
+ return utils::TaskRescheduleInfo::RetryIn(next_execution_time_point -
std::chrono::steady_clock::now());
Review Comment:
We filter these out in the ctor in
https://github.com/apache/nifi-minifi-cpp/pull/1581/files#diff-a598c25bd74649903655c7c852fe86ba84347d14c068acbe27c804bdcbee4605R55
--
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]