コード例 #1
0
ファイル: PushToPipelineTask.php プロジェクト: skrz/stack
 public function work()
 {
     try {
         $message = ChangeVO::create();
         $message->setDatetime(new DateTime())->setMessage("Hi there!");
         $this->changeProducer->publish($message);
     } catch (\Exception $e) {
         $this->log->critical("Couldn't push to pipeline. Possible missing rabbit on your machine?");
         throw $e;
     }
 }
コード例 #2
0
ファイル: ChangeProducer.php プロジェクト: skrz/stack
 public function preProcessMessage(ChangeVO $change)
 {
     $change->setHostname(gethostname())->setApplication($this->applicationName);
 }