This commit is contained in:
2020-09-07 16:50:26 +08:00
parent fc75362bac
commit 0b439c4f1d
2 changed files with 10 additions and 2 deletions
+4 -1
View File
@@ -9,8 +9,10 @@ use HttpServer\Abstracts\Callback;
use HttpServer\Route\Annotation\Websocket as AWebsocket;
use HttpServer\Service\Http;
use HttpServer\Service\Websocket;
use Snowflake\Abstracts\Config;
use Snowflake\Error\Logger;
use Snowflake\Event;
use Snowflake\Exception\ConfigException;
use Snowflake\Snowflake;
use Swoole\Server;
@@ -66,10 +68,11 @@ class OnWorkerStart extends Callback
* @param $socket
* @param $worker_id
* @return string
* @throws ConfigException
*/
private function get_process_name($socket, $worker_id)
{
$prefix = 'system:';
$prefix = rtrim(Config::get('id', 'system:'), ':');
if ($worker_id >= $socket->setting['worker_num']) {
return $prefix . ': Task: No.' . $worker_id;
} else {