qqq
This commit is contained in:
@@ -25,7 +25,7 @@ use Symfony\Component\Console\{Application as ConsoleApplication,
|
|||||||
Output\ConsoleOutput,
|
Output\ConsoleOutput,
|
||||||
Output\OutputInterface
|
Output\OutputInterface
|
||||||
};
|
};
|
||||||
|
use Kiri\Server\Events\OnWorkerStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Init
|
* Class Init
|
||||||
@@ -124,6 +124,11 @@ class Application extends BaseApplication
|
|||||||
} else if (\config('reload.hot', false) === false) {
|
} else if (\config('reload.hot', false) === false) {
|
||||||
$scanner = $container->get(Scanner::class);
|
$scanner = $container->get(Scanner::class);
|
||||||
$scanner->read(APP_PATH . 'app/');
|
$scanner->read(APP_PATH . 'app/');
|
||||||
|
} else {
|
||||||
|
on(OnWorkerStart::class, function () {
|
||||||
|
$scanner = di(Scanner::class);
|
||||||
|
$scanner->read(APP_PATH . 'app/');
|
||||||
|
}, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
fire(new OnBeforeCommandExecute());
|
fire(new OnBeforeCommandExecute());
|
||||||
|
|||||||
Reference in New Issue
Block a user