This commit is contained in:
as2252258@163.com
2021-03-28 17:15:57 +08:00
parent 1b72a913ec
commit 9de9cdcf96
+11 -11
View File
@@ -42,19 +42,19 @@ class ServerInotify extends Process
{ {
set_error_handler([$this, 'onErrorHandler']); set_error_handler([$this, 'onErrorHandler']);
$this->dirs = Config::get('inotify', false, [APP_PATH]); $this->dirs = Config::get('inotify', false, [APP_PATH]);
// if (extension_loaded('inotify')) { if (extension_loaded('inotify')) {
// $this->inotify = inotify_init(); $this->inotify = inotify_init();
// $this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE; $this->events = IN_MODIFY | IN_DELETE | IN_CREATE | IN_MOVE;
//
// foreach ($this->dirs as $dir) { foreach ($this->dirs as $dir) {
// $this->watch($dir); $this->watch($dir);
// } }
// Event::add($this->inotify, [$this, 'check']); Event::add($this->inotify, [$this, 'check']);
// Event::wait(); Event::wait();
// } else { } else {
$this->loadDirs(); $this->loadDirs();
$this->tick(); $this->tick();
// } }
} }