public function execute()
    {
        if ($this->state === self::STATE_WAITING) {
            $this->state = self::STATE_RUNNING;
            foreach ($this->jobs as $name => $cb) {
                $cb($name, $this);
                $this->jobs[$name] = null;
            }
            $this->checkIfAllReady();
        }
    }
public function execute()
    {
        if ($this->state === self::STATE_WAITING) {
            $this->state = self::STATE_RUNNING;
            foreach ($this->jobs as $name => $cb) {
                $cb($name, $this);
                $this->jobs[$name] = null;
            }
            $this->checkIfAllReady();
        }
    }
public function execute ( ) { if ( $ this -> state === self :: STATE_WAITING ) { $ this -> state = self :: STATE_RUNNING ; foreach ( $ this -> jobs as $ name => $ cb ) { $ cb ( $ name , $ this ) ; $ this -> jobs [ $ name ] = null ; } $ this -> checkIfAllReady ( ) ; } }
Runs the job
@return void
Runs the job