This commit is contained in:
2020-09-11 19:57:01 +08:00
parent 87630e287a
commit a33f4d2728
+3 -2
View File
@@ -30,9 +30,10 @@ abstract class Process extends \Swoole\Process
*/
public function __construct($application, $name)
{
parent::__construct(function (\Swoole\Process $process) use ($name) {
$class = get_called_class();
parent::__construct(function ($process) use ($name, $class) {
if (Snowflake::isLinux()) {
$this->name($name);
$this->name($class . ':' . $name);
}
$this->onHandler($process);
}, false, 1, true);