From 3e304eee6837fb07877c2b191584ea8caa2db82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E4=B8=B6=E7=A7=8B=E7=A7=8B=E7=A7=8B=E7=A7=8B?= =?UTF-8?q?=E7=A7=8B?= <> Date: Mon, 19 Feb 2024 09:49:34 +0800 Subject: [PATCH] Add worker mode information to statistics file --- src/Worker.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Worker.php b/src/Worker.php index be0d3e3d4..b83ba083b 100644 --- a/src/Worker.php +++ b/src/Worker.php @@ -2017,6 +2017,8 @@ protected static function writeStatisticsToStatusFile(): void chmod(static::$statisticsFile, 0722); file_put_contents(static::$statisticsFile, serialize($allWorkerInfo) . "\n", FILE_APPEND); $loadavg = function_exists('sys_getloadavg') ? array_map(round(...), sys_getloadavg(), [2, 2, 2]) : ['-', '-', '-']; + file_put_contents(static::$statisticsFile, + (static::$daemonize ? "Start worker in DAEMON mode." : "Start worker in DEBUG mode.") . "\n", FILE_APPEND); file_put_contents(static::$statisticsFile, "----------------------------------------------GLOBAL STATUS----------------------------------------------------\n", FILE_APPEND); file_put_contents(static::$statisticsFile,