Exemplo n.º 1
0
 /**
  * @param App\CoreBundle\Event\BuildStartedEvent
  */
 public function onBuildStarted(BuildStartedEvent $event)
 {
     $build = $event->getBuild();
     $this->logger->info('starting stopwatch for build #' . $build->getId());
     $this->stopwatch->start($build->getChannel());
     $build->setStartTime(new DateTime());
 }
 /**
  * @param App\CoreBundle\Event\BuildStartedEvent
  */
 public function onBuildStarted(BuildStartedEvent $event)
 {
     $build = $event->getBuild();
     /** @todo write a producer that accepts Message objects */
     $this->logger->info('sending build.started message', ['build' => $build->getId()]);
     $message = $this->factory->createBuildStarted($build);
     $this->producer->publish((string) $message);
 }