modify
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace Snowflake\Process;
|
||||
namespace Kiri\Process;
|
||||
|
||||
|
||||
interface ISystem
|
||||
|
||||
@@ -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,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Snowflake\Process;
|
||||
namespace Kiri\Process;
|
||||
|
||||
|
||||
interface SProcess
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user