This commit is contained in:
xl
2024-11-18 11:27:05 +08:00
parent a5378658ee
commit 82ff5c5d42
+3 -4
View File
@@ -53,16 +53,15 @@ class HotReload extends AbstractProcess
public function process(Process|null $process): void
{
$this->pipe = inotify_init();
$this->readDirectory(APP_PATH . '/app/*');
$this->readDirectory(APP_PATH . '/routes/*');
foreach (config('reload.listen') as $key => $value) {
$this->readDirectory($value . '/*');
}
while (!$this->isStop()) {
$read = inotify_read($this->pipe);
foreach ($read as $item) {
$this->reWatch($item['name']);
}
$this->reload();