modify plugin name
This commit is contained in:
@@ -154,6 +154,9 @@ class Server extends HttpService
|
|||||||
*/
|
*/
|
||||||
public function setWorkerName(OnWorkerStart $onWorkerStart): void
|
public function setWorkerName(OnWorkerStart $onWorkerStart): void
|
||||||
{
|
{
|
||||||
|
if (!property_exists($onWorkerStart->server, 'worker_pid')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$prefix = sprintf('Worker Process[%d].%d', $onWorkerStart->server->worker_pid, $onWorkerStart->workerId);
|
$prefix = sprintf('Worker Process[%d].%d', $onWorkerStart->server->worker_pid, $onWorkerStart->workerId);
|
||||||
set_env('environmental', Kiri::WORKER);
|
set_env('environmental', Kiri::WORKER);
|
||||||
|
|
||||||
@@ -167,6 +170,9 @@ class Server extends HttpService
|
|||||||
*/
|
*/
|
||||||
public function setTaskerName(OnTaskerStart $onWorkerStart): void
|
public function setTaskerName(OnTaskerStart $onWorkerStart): void
|
||||||
{
|
{
|
||||||
|
if (!property_exists($onWorkerStart->server, 'worker_pid')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$prefix = sprintf('Tasker Process[%d].%d', $onWorkerStart->server->worker_pid, $onWorkerStart->workerId);
|
$prefix = sprintf('Tasker Process[%d].%d', $onWorkerStart->server->worker_pid, $onWorkerStart->workerId);
|
||||||
set_env('environmental', Kiri::TASK);
|
set_env('environmental', Kiri::TASK);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user