This commit is contained in:
2021-07-23 10:59:41 +08:00
parent 41b8969b02
commit 4fbbfb37e4
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -122,6 +122,7 @@ class ServerManager extends Abstracts\Server
if (Snowflake::getPlatform()->isLinux()) {
$soloProcess->name($system . '.' . $customProcess->getProcessName($soloProcess) . ' start.');
}
echo sprintf("\033[36m[init]\033[0m Process %s start.", $customProcess->getProcessName($soloProcess)) . PHP_EOL;
$customProcess->onHandler($soloProcess);
},
$redirect_stdin_and_stdout, $pipe_type, $enable_coroutine));
@@ -212,6 +213,7 @@ class ServerManager extends Abstracts\Server
*/
private function addNewListener(string $type, string $host, int $port, int $mode, array $settings = [])
{
echo sprintf("\033[36m[init]\033[0m $type service %s::%d start.", $host, $port) . PHP_EOL;
switch ($type) {
case Constant::SERVER_TYPE_TCP:
$this->ports[$port] = TCPServerListener::instance($this->server, $host, $port, $mode, $settings);
@@ -268,6 +270,9 @@ class ServerManager extends Abstracts\Server
Config::get('server.settings', []),
$settings['settings']
));
echo sprintf("\033[36m[init]\033[0m $type service %s::%d start.", $host, $port) . PHP_EOL;
$this->addDefaultListener($type, $settings);
}
+1 -1
View File
@@ -59,7 +59,7 @@ class ServerWorker extends \Server\Abstracts\Server
$annotation->runtime(CONTROLLER_PATH);
$annotation->runtime(MODEL_PATH);
} else {
echo sprintf("\033[36m[init]\033[0m Tasker[%d].#%03d start.", $server->worker_pid, $workerId) . PHP_EOL;
echo sprintf("\033[36m[init]\033[0m Tasker[%d].%d start.", $server->worker_pid, $workerId) . PHP_EOL;
$this->setProcessName(sprintf('Tasker[%d].%d', $workerId, $server->worker_pid));