示例#1
0
 /**
  * @internal for pcntl only
  */
 public function signalHup()
 {
     if ($this->consumer) {
         pcntl_signal(SIGHUP, SIG_DFL);
         $this->consumer->forceStopConsumer();
     }
     // TODO: Implement restarting of consumer
 }
示例#2
0
 public function __construct(AMQPConnection $conn)
 {
     parent::__construct($conn);
     $this->setQueueOptions(array('name' => '', 'passive' => false, 'durable' => false, 'exclusive' => true, 'autoDelete' => true, 'nowait' => false, 'arguments' => null, 'ticket' => null));
 }
 /**
  * @param InputInterface $input An InputInterface instance
  * @param OutputInterface $output An OutputInterface instance
  *
  * @return integer 0 if everything went fine, or an error code
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->consumer->consume($this->amount);
 }