src/Rocketeer/Services/Tasks/TasksQueue.php
public function executeJob(Job $job)
    {
        // Set proper server
        $connectionKey = $job->connectionKey;
        $this->connections->setCurrentConnection($connectionKey);

        foreach ($job->queue as $key => $task) {
            if ($task->usesStages()) {
                $stage = $task->usesStages() ? $connectionKey->stage : null;
                $this->connections->setStage($stage);
            }

            // Check if the current server can run the task
            if (!$this->connections->getCurrentConnection()->isCompatibleWith($task)) {
                continue;
            }

            // Here we fire the task, save its
            // output and return its status
            $state = $task->fire();
            $this->toOutput($state);

            // If the task didn't finish, display what the error was
            if ($task->wasHalted() || $state === false) {
                $this->explainer->error('The tasks queue was canceled by task "'.$task->getName().'"');

                return false;
            }
        }

        return true;
    }
public function executeJob(Job $job)
    {
        // Set proper server
        $connectionKey = $job->connectionKey;
        $this->connections->setCurrentConnection($connectionKey);

        foreach ($job->queue as $key => $task) {
            if ($task->usesStages()) {
                $stage = $task->usesStages() ? $connectionKey->stage : null;
                $this->connections->setStage($stage);
            }

            // Check if the current server can run the task
            if (!$this->connections->getCurrentConnection()->isCompatibleWith($task)) {
                continue;
            }

            // Here we fire the task, save its
            // output and return its status
            $state = $task->fire();
            $this->toOutput($state);

            // If the task didn't finish, display what the error was
            if ($task->wasHalted() || $state === false) {
                $this->explainer->error('The tasks queue was canceled by task "'.$task->getName().'"');

                return false;
            }
        }

        return true;
    }
public function executeJob ( Job $ job ) { // Set proper server $ connectionKey = $ job -> connectionKey ; $ this -> connections -> setCurrentConnection ( $ connectionKey ) ; foreach ( $ job -> queue as $ key => $ task ) { if ( $ task -> usesStages ( ) ) { $ stage = $ task -> usesStages ( ) ? $ connectionKey -> stage : null ; $ this -> connections -> setStage ( $ stage ) ; } // Check if the current server can run the task if ( ! $ this -> connections -> getCurrentConnection ( ) -> isCompatibleWith ( $ task ) ) { continue ; } // Here we fire the task, save its // output and return its status $ state = $ task -> fire ( ) ; $ this -> toOutput ( $ state ) ; // If the task didn't finish, display what the error was if ( $ task -> wasHalted ( ) || $ state === false ) { $ this -> explainer -> error ( 'The tasks queue was canceled by task "' . $ task -> getName ( ) . '"' ) ; return false ; } } return true ; }
Run the queue, taking into account the stage.

@param Job $job

@return bool
Run the queue taking into account the stage .