src/Rocketeer/Services/Tasks/TasksQueue.php
public function run($tasks)
    {
        $tasks = is_array($tasks) ? $tasks : [$tasks];
        $queue = $this->builder->buildTasks($tasks);
        $pipeline = $this->buildPipeline($queue);

        // Wrap job in closure pipeline
        foreach ($pipeline as $key => $job) {
            $pipeline[$key] = function () use ($job) {
                return $this->executeJob($job);
            };
        }

        // Run the tasks and store the results
        if ($this->getOption('parallel')) {
            $pipeline = $this->runAsynchronously($pipeline);
        } else {
            $pipeline = $this->runSynchronously($pipeline);
        }

        return $pipeline;
    }
public function run($tasks)
    {
        $tasks = is_array($tasks) ? $tasks : [$tasks];
        $queue = $this->builder->buildTasks($tasks);
        $pipeline = $this->buildPipeline($queue);

        // Wrap job in closure pipeline
        foreach ($pipeline as $key => $job) {
            $pipeline[$key] = function () use ($job) {
                return $this->executeJob($job);
            };
        }

        // Run the tasks and store the results
        if ($this->getOption('parallel')) {
            $pipeline = $this->runAsynchronously($pipeline);
        } else {
            $pipeline = $this->runSynchronously($pipeline);
        }

        return $pipeline;
    }
public function run ( $ tasks ) { $ tasks = is_array ( $ tasks ) ? $ tasks : [ $ tasks ] ; $ queue = $ this -> builder -> buildTasks ( $ tasks ) ; $ pipeline = $ this -> buildPipeline ( $ queue ) ; // Wrap job in closure pipeline foreach ( $ pipeline as $ key => $ job ) { $ pipeline [ $ key ] = function ( ) use ( $ job ) { return $ this -> executeJob ( $ job ) ; } ; } // Run the tasks and store the results if ( $ this -> getOption ( 'parallel' ) ) { $ pipeline = $ this -> runAsynchronously ( $ pipeline ) ; } else { $ pipeline = $ this -> runSynchronously ( $ pipeline ) ; } return $ pipeline ; }
Run the queue
Run an array of Tasks instances on the various
connections and stages provided.

@param string|array $tasks An array of tasks

@throws Exception

@return Pipeline
Run the queue Run an array of Tasks instances on the various connections and stages provided .