예제 #1
0
파일: Queue.php 프로젝트: ackintosh/snidel
 /**
  * @param   \Ackintosh\Snidel\Result\Result
  * @throws  \RuntimeException
  */
 public function enqueue(Result $result)
 {
     if ($this->isExceedsLimit($serialized = ResultFormatter::serialize($result)) && $this->isExceedsLimit($serialized = ResultFormatter::minifyAndSerialize($result))) {
         throw new \RuntimeException('the fork which includes result exceeds the message queue limit.');
     }
     return $this->sendMessage($serialized);
 }