Example #1
0
 /**
  * @param Event $event
  */
 private function runEvent(Event $event)
 {
     /** @var EventCommandInterface $command */
     $command = $this->container->get($event->getEventCommandService());
     $command->setEventModel($event->getEventModel());
     $command->run();
     $event->setLastRun($this->container->get("core.service.date")->getDateTime());
     try {
         $this->initNextRun($event);
         $this->saveEvent($event);
     } catch (\RuntimeException $e) {
         $this->manager->remove($event);
         $this->manager->flush();
     }
 }