From 18b77760cd1d667034a73e4a33f308ec55d0b2c9 Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 5 Nov 2021 01:14:27 +0800 Subject: [PATCH] 111 --- kiri-engine/FileListen/FileChangeCustomProcess.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kiri-engine/FileListen/FileChangeCustomProcess.php b/kiri-engine/FileListen/FileChangeCustomProcess.php index b960cc2c..afb00199 100644 --- a/kiri-engine/FileListen/FileChangeCustomProcess.php +++ b/kiri-engine/FileListen/FileChangeCustomProcess.php @@ -61,11 +61,11 @@ class FileChangeCustomProcess extends Command set_error_handler([$this, 'onErrorHandler']); $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]); -// } else { -// $driver = Kiri::getDi()->get(Inotify::class, [$this->dirs, $this]); -// } + } else { + $driver = Kiri::getDi()->get(Inotify::class, [$this->dirs, $this]); + } $this->trigger_reload(); Coroutine::create(function () use ($driver) { $driver->start();