mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 23:55:35 +08:00
add cs fixer and PHPStan and activate it (build 436)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Event\SwooleEvent;
|
||||
|
||||
|
||||
use Swoole\Process;
|
||||
use ZM\Annotation\Swoole\SwooleHandler;
|
||||
use ZM\Console\Console;
|
||||
@@ -13,7 +13,6 @@ use ZM\Utils\Manager\ProcessManager;
|
||||
|
||||
/**
|
||||
* Class OnManagerStop
|
||||
* @package ZM\Event\SwooleEvent
|
||||
* @SwooleHandler("ManagerStop")
|
||||
*/
|
||||
class OnManagerStop implements SwooleEvent
|
||||
@@ -21,9 +20,11 @@ class OnManagerStop implements SwooleEvent
|
||||
public function onCall()
|
||||
{
|
||||
foreach (ProcessManager::$user_process as $v) {
|
||||
if (posix_getsid($v->pid) !== false) Process::kill($v->pid, SIGTERM);
|
||||
if (posix_getsid($v->pid) !== false) {
|
||||
Process::kill($v->pid, SIGTERM);
|
||||
}
|
||||
}
|
||||
Console::verbose("进程 Manager 已停止!");
|
||||
Console::verbose('进程 Manager 已停止!');
|
||||
Framework::removeProcessState(ZM_PROCESS_MANAGER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user