改名
This commit is contained in:
@@ -251,10 +251,6 @@ class Server extends Application
|
|||||||
$system->write(Json::encode($this->params[$name]));
|
$system->write(Json::encode($this->params[$name]));
|
||||||
}
|
}
|
||||||
$this->baseServer->addProcess($system);
|
$this->baseServer->addProcess($system);
|
||||||
if (Snowflake::isLinux()) {
|
|
||||||
$prefix = ucfirst(rtrim(Snowflake::app()->id, ':'));
|
|
||||||
$system->name($prefix . ': ' . $name . '::' . $process);
|
|
||||||
}
|
|
||||||
$application->set($process, $system);
|
$application->set($process, $system);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,12 @@ abstract class Process extends \Swoole\Process
|
|||||||
*/
|
*/
|
||||||
public function __construct($application, $name, $enable_coroutine = true)
|
public function __construct($application, $name, $enable_coroutine = true)
|
||||||
{
|
{
|
||||||
parent::__construct(function ($process) use ($name) {
|
$class = get_called_class();
|
||||||
|
parent::__construct(function ($process) use ($name, $class) {
|
||||||
|
if (Snowflake::isLinux()) {
|
||||||
|
$prefix = ucfirst(rtrim(Snowflake::app()->id, ':'));
|
||||||
|
$this->name($prefix . ': ' . $class);
|
||||||
|
}
|
||||||
$this->onHandler($process);
|
$this->onHandler($process);
|
||||||
}, false, 1, $enable_coroutine);
|
}, false, 1, $enable_coroutine);
|
||||||
$this->application = $application;
|
$this->application = $application;
|
||||||
|
|||||||
Reference in New Issue
Block a user