walkor před 3 roky
rodič
revize
d2787647c2
1 změnil soubory, kde provedl 4 přidání a 6 odebrání
  1. 4 6
      Worker.php

+ 4 - 6
Worker.php

@@ -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) {