modify
This commit is contained in:
@@ -26,8 +26,10 @@ class ServerWorker extends \Server\Abstracts\Server
|
||||
*/
|
||||
public function onWorkerStart(Server $server, int $workerId)
|
||||
{
|
||||
$this->_setConfigCache($workerId);
|
||||
$annotation = Snowflake::app()->getAnnotation();
|
||||
$annotation->read(APP_PATH);
|
||||
|
||||
$this->runEvent(Constant::WORKER_START, null, [$server, $workerId]);
|
||||
if ($workerId >= $server->setting['worker_num'] + 1) {
|
||||
$annotation->runtime(CONTROLLER_PATH);
|
||||
@@ -41,7 +43,7 @@ class ServerWorker extends \Server\Abstracts\Server
|
||||
* @param $worker_id
|
||||
* @throws Exception
|
||||
*/
|
||||
private function setConfigs($worker_id)
|
||||
private function _setConfigCache($worker_id)
|
||||
{
|
||||
putenv('state=start');
|
||||
putenv('worker=' . $worker_id);
|
||||
|
||||
Reference in New Issue
Block a user