Revert "改名"
This reverts commit fdf58326
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Kiri\Server\Events;
|
||||||
|
|
||||||
|
class OnProcessStart
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
+6
-1
@@ -2,14 +2,16 @@
|
|||||||
|
|
||||||
namespace Kiri\Server;
|
namespace Kiri\Server;
|
||||||
|
|
||||||
|
use Kiri;
|
||||||
use Kiri\Abstracts\Config;
|
use Kiri\Abstracts\Config;
|
||||||
use Kiri\Annotation\Inject;
|
use Kiri\Annotation\Inject;
|
||||||
use Kiri\Context;
|
use Kiri\Context;
|
||||||
|
use Kiri\Events\EventDispatch;
|
||||||
use Kiri\Exception\ConfigException;
|
use Kiri\Exception\ConfigException;
|
||||||
use Kiri;
|
|
||||||
use Kiri\Server\Abstracts\BaseProcess;
|
use Kiri\Server\Abstracts\BaseProcess;
|
||||||
use Kiri\Server\Broadcast\Message;
|
use Kiri\Server\Broadcast\Message;
|
||||||
use Kiri\Server\Contract\OnProcessInterface;
|
use Kiri\Server\Contract\OnProcessInterface;
|
||||||
|
use Kiri\Server\Events\OnProcessStart;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Swoole\Coroutine;
|
use Swoole\Coroutine;
|
||||||
use Swoole\Process;
|
use Swoole\Process;
|
||||||
@@ -57,6 +59,9 @@ class ProcessManager
|
|||||||
if (Kiri::getPlatform()->isLinux()) {
|
if (Kiri::getPlatform()->isLinux()) {
|
||||||
$process->name($system . '(' . $customProcess->getName() . ')');
|
$process->name($system . '(' . $customProcess->getName() . ')');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Kiri::getDi()->get(EventDispatch::class)->dispatch(new OnProcessStart());
|
||||||
|
|
||||||
set_env('environmental', Kiri::PROCESS);
|
set_env('environmental', Kiri::PROCESS);
|
||||||
$channel = Coroutine::create(function () use ($process, $customProcess) {
|
$channel = Coroutine::create(function () use ($process, $customProcess) {
|
||||||
while (!$customProcess->isStop()) {
|
while (!$customProcess->isStop()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user