protected function dealWithTermTimeout()
{
if ($this->isDealedWithTermTimeout) {
return false;
}
if (microtime(true) - $this->termTime <= $this->config->getTermTimeout()) {
return false;
}
try {
Logger::info("process[" . $this->getProcess()->getPid() . "] will be killed for termTimeout");
$this->getProcess()->kill();
$this->isDealedWithTermTimeout = true;
} catch (\Exception $e) {
Logger::err($e);
return false;
}
return true;
}