改名
This commit is contained in:
@@ -25,9 +25,9 @@ class OnTaskerStart extends WorkerStart implements EventDispatcherInterface
|
||||
$time = microtime(true);
|
||||
|
||||
ServerManager::setEnv('environmental', Kiri::TASK);
|
||||
if (!is_enable_file_modification_listening()) {
|
||||
$this->interpretDirectory();
|
||||
}
|
||||
// if (!is_enable_file_modification_listening()) {
|
||||
// $this->interpretDirectory();
|
||||
// }
|
||||
|
||||
$this->mixed($event, false, $time);
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@ class OnWorkerStart extends WorkerStart implements EventDispatcherInterface
|
||||
$time = microtime(true);
|
||||
|
||||
ServerManager::setEnv('environmental', Kiri::WORKER);
|
||||
if (is_enable_file_modification_listening()) {
|
||||
$this->router->read_files();
|
||||
$this->interpretDirectory();
|
||||
}
|
||||
// if (is_enable_file_modification_listening()) {
|
||||
// $this->router->read_files();
|
||||
// $this->interpretDirectory();
|
||||
// }
|
||||
$this->mixed($event, true, $time);
|
||||
}
|
||||
|
||||
|
||||
@@ -234,12 +234,16 @@ class Application extends BaseApplication
|
||||
private function enableFileChange(Command $class, $input, $output): void
|
||||
{
|
||||
fire(new OnBeforeCommandExecute());
|
||||
if (!($class instanceof ServerCommand)) {
|
||||
scan_directory(directory('app'), 'App');
|
||||
} else if (!is_enable_file_modification_listening()) {
|
||||
$this->getRouter()->read_files();
|
||||
scan_directory(directory('app'), 'App');
|
||||
}
|
||||
// if (!($class instanceof ServerCommand)) {
|
||||
// scan_directory(directory('app'), 'App');
|
||||
// } else if (!is_enable_file_modification_listening()) {
|
||||
// $this->getRouter()->read_files();
|
||||
// scan_directory(directory('app'), 'App');
|
||||
// }
|
||||
scan_directory(directory('app'), 'App');
|
||||
if ($class instanceof ServerCommand) {
|
||||
$this->getRouter()->read_files();
|
||||
}
|
||||
$class->run($input, $output);
|
||||
$output->writeln('ok' . PHP_EOL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user