This commit is contained in:
2021-08-12 14:08:40 +08:00
parent 3bd3a39642
commit 14cb8a45d3
12 changed files with 152 additions and 21 deletions
+18 -1
View File
@@ -21,11 +21,28 @@ abstract class Server
{
/**
* @param $prefix
* @throws ConfigException
*/
protected function setProcessName($prefix)
{
if (Kiri::getPlatform()->isMac()) {
return;
}
$name = Config::get('id', 'system-service');
if (!empty($prefix)) {
$name .= '.' . $prefix;
}
swoole_set_process_name($name);
}
/**
* Server constructor.
* @throws Exception
*/
public function __construct(protected \Swoole\Server|Port $server)
public function __construct()
{
}