protected function registerTimeoutHandler($job, $timeout)
    {
        pcntl_signal(SIGALRM, function () {
            $this->kill(1);
        });

        pcntl_alarm(
            max($this->timeoutForJob($job, $timeout), 0)
        );
    }
protected function registerTimeoutHandler($job, $timeout)
    {
        pcntl_signal(SIGALRM, function () {
            $this->kill(1);
        });

        pcntl_alarm(
            max($this->timeoutForJob($job, $timeout), 0)
        );
    }
protected function registerTimeoutHandler ( $ job , $ timeout ) { pcntl_signal ( SIGALRM , function ( ) { $ this -> kill ( 1 ) ; } ) ; pcntl_alarm ( max ( $ this -> timeoutForJob ( $ job , $ timeout ) , 0 ) ) ; }
Register the worker timeout handler.

@param Job|null $job
@param int      $timeout
@return void
Register the worker timeout handler .