This commit is contained in:
as2252258@163.com
2021-08-11 01:04:57 +08:00
parent 63d8eaa4a5
commit 682246df28
219 changed files with 790 additions and 791 deletions
+3 -3
View File
@@ -1,13 +1,13 @@
<?php
namespace Snowflake\Process;
namespace Kiri\Process;
use Exception;
use JetBrains\PhpStorm\Pure;
use Server\SInterface\CustomProcess;
use Snowflake\Snowflake;
use Kiri\Kiri;
use Swoole\Timer;
/**
@@ -35,7 +35,7 @@ class Biomonitoring implements CustomProcess
*/
public function onHandler(\Swoole\Process $process): void
{
$server = Snowflake::app()->getSwoole();
$server = Kiri::app()->getSwoole();
Timer::tick(1000, function () use ($server) {
clearstatcache();
if (filesize($server->setting['log_file']) > 1024000000) {
+1 -1
View File
@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Snowflake\Process;
namespace Kiri\Process;
interface ISystem
+7 -7
View File
@@ -2,17 +2,17 @@
declare(strict_types=1);
namespace Snowflake\Process;
namespace Kiri\Process;
use Exception;
use JetBrains\PhpStorm\Pure;
use Snowflake\Event;
use Snowflake\Snowflake;
use Kiri\Event;
use Kiri\Kiri;
/**
* Class Process
* @package Snowflake\Snowflake\Service
* @package Kiri\Kiri\Service
*/
abstract class Process extends \Swoole\Process implements SProcess
{
@@ -36,12 +36,12 @@ abstract class Process extends \Swoole\Process implements SProcess
*/
public function _load(Process $process)
{
Snowflake::setProcessId($this->pid);
Kiri::setProcessId($this->pid);
putenv('environmental=' . Snowflake::PROCESS);
putenv('environmental=' . Kiri::PROCESS);
fire(Event::SERVER_WORKER_START);
if (Snowflake::getPlatform()->isLinux()) {
if (Kiri::getPlatform()->isLinux()) {
name($this->pid, $this->getProcessName());
}
if (method_exists($this, 'before')) {
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace Snowflake\Process;
namespace Kiri\Process;
interface SProcess
+6 -6
View File
@@ -7,20 +7,20 @@
*/
declare(strict_types=1);
namespace Snowflake\Process;
namespace Kiri\Process;
use Exception;
use Server\SInterface\CustomProcess;
use Snowflake\Abstracts\Config;
use Snowflake\Exception\ConfigException;
use Snowflake\Snowflake;
use Kiri\Abstracts\Config;
use Kiri\Exception\ConfigException;
use Kiri\Kiri;
use Swoole\Event;
use Swoole\Timer;
/**
* Class ServerInotify
* @package Snowflake\Snowflake\Server
* @package Kiri\Kiri\Server
*/
class ServerInotify implements CustomProcess
{
@@ -238,7 +238,7 @@ class ServerInotify implements CustomProcess
print_r(implode(PHP_EOL, $output));
Snowflake::reload();
Kiri::reload();
}