Exemplo n.º 1
0
 /**
  * Execute action 
  *
  * @param \CentreonConfiguration\Events\SynchronizeFiles $event
  * @throws Exception
  */
 public static function execute(SynchronizeFilesEvent $event)
 {
     $endpoints = BrokerRepository::getConfigEndpoints($event->getPollerId());
     foreach ($endpoints as $endpoint) {
         try {
             BrokerRepository::sendCommand($event->getPollerId(), $endpoint . ';DUMP_DIR');
         } catch (\Exception $e) {
             $event->setOutput($e->getMessage());
         }
     }
 }