This commit is contained in:
as2252258@163.com
2021-03-01 00:37:16 +08:00
parent 6778cd5254
commit a82a214efc
+2 -4
View File
@@ -44,16 +44,13 @@ class ServerInotify extends Process
$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;
var_dump($this->dirs);
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->loadByDir(APP_PATH . 'app'); $this->loadByDir(APP_PATH . 'app');
$this->loadByDir(APP_PATH . 'routes'); $this->loadByDir(APP_PATH . 'routes');
$this->loadByDir(__DIR__ . '/../../'); $this->loadByDir(__DIR__ . '/../../');
@@ -212,6 +209,7 @@ class ServerInotify extends Process
*/ */
public function trigger_reload() public function trigger_reload()
{ {
var_dump('trigger_reload');
Snowflake::reload(); Snowflake::reload();
} }