Skip to content

Commit

Permalink
Merge pull request #1011 from lengqiuqiuqiu/global_status
Browse files Browse the repository at this point in the history
Add worker mode information to statistics file
  • Loading branch information
walkor authored Mar 15, 2024
2 parents c330b08 + 3e304ee commit 35ee846
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 35ee846

Please sign in to comment.