From fb7a0b6ffc64476112d7a174a2a22b8585bb5ce2 Mon Sep 17 00:00:00 2001 From: anfu Date: Fri, 13 Sep 2024 10:53:01 +0800 Subject: [PATCH] =?UTF-8?q?workerman=E6=89=93=E5=8D=B0env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.sh | 4 +--- start.php | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/run.sh b/run.sh index 615da6a..8626b27 100644 --- a/run.sh +++ b/run.sh @@ -5,6 +5,4 @@ php-fpm -D # 启动nginx nginx # 启动nacos心跳服务 -php ./start.php start > /dev/null -# hold后台 -sh +php ./start.php start diff --git a/start.php b/start.php index 3a7fff8..298e80b 100644 --- a/start.php +++ b/start.php @@ -47,7 +47,8 @@ $task->onWorkerStart = function(Worker $task) use ($serverAddr, $nacosAddr) }' ], ]); - echo "send heartbeat: " . $response->getBody()->getContents(); + echo "send heartbeat: " . $response->getBody()->getContents() . "\n"; + echo json_encode($_ENV, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE); echo "\n"; }); };