public function setInterval($interval)
    {
        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker interval after worker has started working');
        }

        $this->interval = $interval;
    }
public function setInterval($interval)
    {
        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker interval after worker has started working');
        }

        $this->interval = $interval;
    }
public function setInterval ( $ interval ) { if ( $ this -> status != self :: STATUS_NEW ) { throw new \ RuntimeException ( 'Cannot set worker interval after worker has started working' ) ; } $ this -> interval = $ interval ; }
Set the worker interval

@param int $interval The worker interval
Set the worker interval