Queue.php
/**
     * Listen to a queue and consume webpages to crawl.
     *
     * @param \Callable $callback The method that should be called for every job
     *
     * @return \Simgroep\ConcurrentSpiderBundle\Queue
     */
Listen to a queue and consume webpages to crawl.
@param \Callable $callback The method that should be called for every job


Listen to a queue and consume webpages to crawl . @param \ Callable $callback The method that should be called for every job
public function listen(Callable $callback)
    {
        $channel = $this->getChannel();
        $this->consumeBasic($this->queueName, $callback, $channel);
        if ($this->revisitDisabled == false) {
            $this->consumeBasic('revisit', $callback, $channel);
        }
        while (count($channel->callbacks)) {
            $channel->wait();
        }
        return $this;
    }
public function listen ( Callable $ callback ) { $ channel = $ this -> getChannel ( ) ; $ this -> consumeBasic ( $ this -> queueName , $ callback , $ channel ) ; if ( $ this -> revisitDisabled == false ) { $ this -> consumeBasic ( 'revisit' , $ callback , $ channel ) ; } while ( count ( $ channel -> callbacks ) ) { $ channel -> wait ( ) ; } return $ this ; }
Listen to a queue and consume webpages to crawl.
Listen to a queue and consume webpages to crawl .