Comos\Qpm\Supervision\ProcessStub::dealWithTimeout PHP Метод

dealWithTimeout() публичный Метод

public dealWithTimeout ( ) : boolean
Результат boolean
    public function dealWithTimeout()
    {
        if (!$this->isTimeout()) {
            return false;
        }
        if ($this->isDealedWithTimeout) {
            if (!$this->config->isKillingOnTimeoutEnabled()) {
                $this->dealWithTermTimeout();
            }
            return false;
        }
        $this->isDealedWithTimeout = true;
        Logger::info("process[" . $this->getProcess()->getPid() . "] will be terminated for timeout");
        $this->invokeOnTimeout();
        try {
            if ($this->config->isKillingOnTimeoutEnabled()) {
                $this->getProcess()->kill();
            } else {
                $this->termTime = microtime(true);
                $this->getProcess()->terminate();
            }
        } catch (\Exception $e) {
            Logger::err($e);
            return false;
        }
        return true;
    }