This commit is contained in:
2021-11-05 01:14:27 +08:00
parent 65a874c155
commit 18b77760cd
@@ -61,11 +61,11 @@ class FileChangeCustomProcess extends Command
set_error_handler([$this, 'onErrorHandler']); set_error_handler([$this, 'onErrorHandler']);
$this->dirs = Config::get('inotify', [APP_PATH . 'app']); $this->dirs = Config::get('inotify', [APP_PATH . 'app']);
// if (!extension_loaded('inotify')) { if (!extension_loaded('inotify')) {
$driver = Kiri::getDi()->get(Scaner::class, [$this->dirs, $this]); $driver = Kiri::getDi()->get(Scaner::class, [$this->dirs, $this]);
// } else { } else {
// $driver = Kiri::getDi()->get(Inotify::class, [$this->dirs, $this]); $driver = Kiri::getDi()->get(Inotify::class, [$this->dirs, $this]);
// } }
$this->trigger_reload(); $this->trigger_reload();
Coroutine::create(function () use ($driver) { Coroutine::create(function () use ($driver) {
$driver->start(); $driver->start();