modify
This commit is contained in:
@@ -11,6 +11,7 @@ use Snowflake\Application;
|
||||
use Snowflake\Event;
|
||||
use Snowflake\Exception\ComponentException;
|
||||
use Snowflake\Snowflake;
|
||||
use Swoole\Coroutine\System;
|
||||
|
||||
/**
|
||||
* Class Process
|
||||
@@ -35,6 +36,11 @@ abstract class Process extends \Swoole\Process implements SProcess
|
||||
parent::__construct([$this, '_load'], false, 1, $enable_coroutine);
|
||||
$this->application = $application;
|
||||
Snowflake::setProcessId($this->pid);
|
||||
|
||||
$content = System::readFile(storage('runtime.php'));
|
||||
|
||||
$annotation = Snowflake::app()->getAnnotation();
|
||||
$annotation->setLoader(unserialize($content));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user