Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/83#discussion_r117021448
  
    --- Diff: libminifi/src/SchedulingAgent.cpp ---
    @@ -39,6 +40,36 @@ bool 
SchedulingAgent::hasWorkToDo(std::shared_ptr<core::Processor> processor) {
         return false;
     }
     
    +void SchedulingAgent::enableControllerService(
    +    std::shared_ptr<core::controller::ControllerServiceNode> &serviceNode) 
{
    +
    +  logger_->log_trace("Enabling CSN in SchedulingAgent %s",
    +                     serviceNode->getName());
    +  // reference the enable function from serviceNode
    +  std::function<bool()> f_ex = [serviceNode] {
    +    return serviceNode->enable();
    +  };
    +  // create a functor that will be submitted to the thread pool.
    +  utils::Worker<bool> functor(f_ex);
    +  // move the functor into the thread pool. While a future is returned
    +  // we aren't terribly concerned with the result.
    +  component_lifecycle_thread_pool_.execute(std::move(functor));
    +}
    +
    +void SchedulingAgent::disableControllerService(
    --- End diff --
    
    The FlowController is an implementation of a controller service provider. 
It will start the controller services and disable them at shutdown to allow for 
cleanup. There's still some questions in my mind if that is adequate (i.e. 
we're using a timer in some spots ), but that is a separate issue and  captured 
in a ticket.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to