|
|
@@ -266,13 +266,11 @@ class Worker
|
|
|
public static $pidFile = '';
|
|
|
|
|
|
/**
|
|
|
- * Phar support.
|
|
|
- * The filename prefix used to store the master process status file.
|
|
|
- * Allow user-defined file paths to store the master process status file.
|
|
|
+ * The file used to store the master process status file.
|
|
|
*
|
|
|
* @var string
|
|
|
*/
|
|
|
- public static $statisticsFileNamePrefix = '';
|
|
|
+ public static $statusFile = '';
|
|
|
|
|
|
/**
|
|
|
* Log file.
|
|
|
@@ -654,7 +652,7 @@ class Worker
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- static::$_statisticsFile = !empty(static::$statisticsFileNamePrefix) ? static::$statisticsFileNamePrefix . posix_getpid().'.status' : __DIR__ . '/../workerman-' .posix_getpid().'.status';
|
|
|
+ static::$_statisticsFile = static::$statusFile ? static::$statusFile : __DIR__ . '/../workerman-' .posix_getpid().'.status';
|
|
|
|
|
|
foreach (static::$_workers as $worker) {
|
|
|
// Worker name.
|
|
|
@@ -932,7 +930,7 @@ class Worker
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
- $statistics_file = !empty(static::$statisticsFileNamePrefix) ? static::$statisticsFileNamePrefix . "$master_pid.status" : __DIR__ . "/../workerman-$master_pid.status";
|
|
|
+ $statistics_file = static::$statusFile ? static::$statusFile : __DIR__ . "/../workerman-$master_pid.status";
|
|
|
|
|
|
// execute command.
|
|
|
switch ($command) {
|