eee
This commit is contained in:
@@ -53,16 +53,15 @@ class HotReload extends AbstractProcess
|
|||||||
public function process(Process|null $process): void
|
public function process(Process|null $process): void
|
||||||
{
|
{
|
||||||
$this->pipe = inotify_init();
|
$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()) {
|
while (!$this->isStop()) {
|
||||||
$read = inotify_read($this->pipe);
|
$read = inotify_read($this->pipe);
|
||||||
|
|
||||||
foreach ($read as $item) {
|
foreach ($read as $item) {
|
||||||
|
|
||||||
$this->reWatch($item['name']);
|
$this->reWatch($item['name']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->reload();
|
$this->reload();
|
||||||
|
|||||||
Reference in New Issue
Block a user