Comos\Qpm\Supervision\Config::isKillingOnTimeoutEnabled PHP Method

isKillingOnTimeoutEnabled() public method

    public function isKillingOnTimeoutEnabled()
    {
        return $this->_termTimeout <= 0.0;
    }

Usage Example

Example #1
0
 /**
  *
  * @throws \Comos\Qpm\Process\Exception
  * @return 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;
 }
All Usage Examples Of Comos\Qpm\Supervision\Config::isKillingOnTimeoutEnabled