src/RequestHandler.php
public function maxExecutionTimeExceeded()
    {
        // client went away while waiting for worker
        if (!$this->connectionOpen) {
            return false;
        }

        $this->incoming->write($this->createErrorResponse('504 Gateway Timeout', 'Maximum execution time exceeded'));
        $this->lastOutgoingData = 'not empty'; // Avoid triggering 502

        // mark slave as closed
        $this->slave->close();
        $this->output->writeln(sprintf('Maximum execution time of %d seconds exceeded. Closing worker.', $this->maxExecutionTime));
        $this->slave->getConnection()->close();
    }
public function maxExecutionTimeExceeded()
    {
        // client went away while waiting for worker
        if (!$this->connectionOpen) {
            return false;
        }

        $this->incoming->write($this->createErrorResponse('504 Gateway Timeout', 'Maximum execution time exceeded'));
        $this->lastOutgoingData = 'not empty'; // Avoid triggering 502

        // mark slave as closed
        $this->slave->close();
        $this->output->writeln(sprintf('Maximum execution time of %d seconds exceeded. Closing worker.', $this->maxExecutionTime));
        $this->slave->getConnection()->close();
    }
public function maxExecutionTimeExceeded ( ) { // client went away while waiting for worker if ( ! $ this -> connectionOpen ) { return false ; } $ this -> incoming -> write ( $ this -> createErrorResponse ( '504 Gateway Timeout' , 'Maximum execution time exceeded' ) ) ; $ this -> lastOutgoingData = 'not empty' ; // Avoid triggering 502 // mark slave as closed $ this -> slave -> close ( ) ; $ this -> output -> writeln ( sprintf ( 'Maximum execution time of %d seconds exceeded. Closing worker.' , $ this -> maxExecutionTime ) ) ; $ this -> slave -> getConnection ( ) -> close ( ) ; }
Stop the worker if the max execution time has been exceeded and return 504
Stop the worker if the max execution time has been exceeded and return 504