This commit is contained in:
2020-12-28 18:26:06 +08:00
parent 599e8826eb
commit cabdd0ba83
2 changed files with 5 additions and 6 deletions
+1 -6
View File
@@ -29,12 +29,7 @@ abstract class Process extends \Swoole\Process
*/
public function __construct($application, $name, $enable_coroutine = true)
{
$class = get_called_class();
parent::__construct(function ($process) use ($name, $class) {
if (Snowflake::isLinux()) {
$prefix = ucfirst(rtrim(Snowflake::app()->id, ':'));
$this->name($prefix . ': ' . $class . '::class');
}
parent::__construct(function ($process) use ($name) {
$this->onHandler($process);
}, false, 1, $enable_coroutine);
$this->application = $application;