src/Rocketeer/Services/Tasks/TasksQueue.php
public function buildPipeline(array $queue)
    {
        // First we'll build the queue
        $pipeline = new Pipeline();

        // Get the connections to execute the tasks on
        /** @var ConnectionInterface[] $connections */
        $connections = $this->connections->getActiveConnections();
        foreach ($connections as $connection) {
            $connectionKey = $connection->getConnectionKey();
            $stages = $this->getStages($connectionKey);

            // Add job to pipeline
            foreach ($stages as $stage) {
                $connectionKey->stage = $stage;

                $pipeline[] = new Job([
                    'connectionKey' => clone $connectionKey,
                    'queue' => $queue,
                ]);
            }
        }

        return $pipeline;
    }
public function buildPipeline(array $queue)
    {
        // First we'll build the queue
        $pipeline = new Pipeline();

        // Get the connections to execute the tasks on
        /** @var ConnectionInterface[] $connections */
        $connections = $this->connections->getActiveConnections();
        foreach ($connections as $connection) {
            $connectionKey = $connection->getConnectionKey();
            $stages = $this->getStages($connectionKey);

            // Add job to pipeline
            foreach ($stages as $stage) {
                $connectionKey->stage = $stage;

                $pipeline[] = new Job([
                    'connectionKey' => clone $connectionKey,
                    'queue' => $queue,
                ]);
            }
        }

        return $pipeline;
    }
public function buildPipeline ( array $ queue ) { // First we'll build the queue $ pipeline = new Pipeline ( ) ; // Get the connections to execute the tasks on /** @var ConnectionInterface[] $connections */ $ connections = $ this -> connections -> getActiveConnections ( ) ; foreach ( $ connections as $ connection ) { $ connectionKey = $ connection -> getConnectionKey ( ) ; $ stages = $ this -> getStages ( $ connectionKey ) ; // Add job to pipeline foreach ( $ stages as $ stage ) { $ connectionKey -> stage = $ stage ; $ pipeline [ ] = new Job ( [ 'connectionKey' => clone $ connectionKey , 'queue' => $ queue , ] ) ; } } return $ pipeline ; }
Build a pipeline of jobs for Parallel to execute.

@param array $queue

@return Pipeline
Build a pipeline of jobs for Parallel to execute .