111
This commit is contained in:
@@ -68,12 +68,12 @@ class OnServerWorker extends \Server\Abstracts\Server
|
|||||||
if (!empty($serialize)) {
|
if (!empty($serialize)) {
|
||||||
Config::sets(unserialize($serialize));
|
Config::sets(unserialize($serialize));
|
||||||
}
|
}
|
||||||
|
$this->workerInitExecutor($server, $workerId);
|
||||||
if (env('enableFileChange', 'off') == 'off') {
|
if (env('enableFileChange', 'off') == 'off') {
|
||||||
$annotation = Kiri::app()->getAnnotation();
|
$annotation = Kiri::app()->getAnnotation();
|
||||||
$annotation->read(APP_PATH . 'app', 'App',
|
$annotation->read(APP_PATH . 'app', 'App',
|
||||||
$workerId < $server->setting['worker_num'] ? [] : [CONTROLLER_PATH]
|
$workerId < $server->setting['worker_num'] ? [] : [CONTROLLER_PATH]
|
||||||
);
|
);
|
||||||
$this->workerInitExecutor($server, $annotation, $workerId);
|
|
||||||
$this->interpretDirectory($annotation);
|
$this->interpretDirectory($annotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ class OnServerWorker extends \Server\Abstracts\Server
|
|||||||
* @throws ConfigException
|
* @throws ConfigException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function workerInitExecutor(Server $server, Annotation $annotation, int $workerId)
|
private function workerInitExecutor(Server $server, int $workerId)
|
||||||
{
|
{
|
||||||
if ($workerId < $server->setting['worker_num']) {
|
if ($workerId < $server->setting['worker_num']) {
|
||||||
$loader = Kiri::app()->getRouter();
|
$loader = Kiri::app()->getRouter();
|
||||||
|
|||||||
Reference in New Issue
Block a user