Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4ac5c4758 | |||
| d161477957 |
@@ -98,14 +98,11 @@ class HotReload extends Command
|
|||||||
public function healthCheck()
|
public function healthCheck()
|
||||||
{
|
{
|
||||||
$pid = (int)file_get_contents(storage('.swoole.pid'));
|
$pid = (int)file_get_contents(storage('.swoole.pid'));
|
||||||
$this->logger->debug('timer ticker.' . $pid . '.' . Process::kill($pid, 0));
|
|
||||||
if (empty($pid)) {
|
if (empty($pid)) {
|
||||||
|
$this->logger->warning('service is shutdown you need reload.');
|
||||||
$this->trigger_reload();
|
$this->trigger_reload();
|
||||||
} else if (!Process::kill($pid, 0)) {
|
} else if (!Process::kill($pid, 0)) {
|
||||||
if ($this->process && Process::kill($this->process->pid, 0)) {
|
$this->logger->warning('service is shutdown you need reload.');
|
||||||
echo 'service is shutdown you need reload.';
|
|
||||||
Process::kill($this->process->pid, -15);
|
|
||||||
}
|
|
||||||
$this->trigger_reload();
|
$this->trigger_reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user