public function run()
    {
        foreach ($this->jobs as $job) {
            $this->worker->run($job);
        }

        while ($this->worker->isRunning()) {
            // waiting for worker to finish
        }

        // allow chaining
        return $this;
    }
public function run()
    {
        foreach ($this->jobs as $job) {
            $this->worker->run($job);
        }

        while ($this->worker->isRunning()) {
            // waiting for worker to finish
        }

        // allow chaining
        return $this;
    }
public function run ( ) { foreach ( $ this -> jobs as $ job ) { $ this -> worker -> run ( $ job ) ; } while ( $ this -> worker -> isRunning ( ) ) { // waiting for worker to finish } // allow chaining return $ this ; }
run all jobs using the worker

@return self
run all jobs using the worker