1
This commit is contained in:
@@ -14,6 +14,9 @@ class Inotify
|
|||||||
private array $watchFiles = [];
|
private array $watchFiles = [];
|
||||||
|
|
||||||
|
|
||||||
|
protected bool $isReloading;
|
||||||
|
|
||||||
|
|
||||||
protected int $cid;
|
protected int $cid;
|
||||||
|
|
||||||
const IG_DIR = [APP_PATH . 'commands', APP_PATH . '.git', APP_PATH . '.gitee'];
|
const IG_DIR = [APP_PATH . 'commands', APP_PATH . '.git', APP_PATH . '.gitee'];
|
||||||
@@ -60,7 +63,7 @@ class Inotify
|
|||||||
if (!($events = inotify_read($this->inotify))) {
|
if (!($events = inotify_read($this->inotify))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->process->isReloading) {
|
if ($this->isReloading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,11 +84,11 @@ class Inotify
|
|||||||
*/
|
*/
|
||||||
public function reload()
|
public function reload()
|
||||||
{
|
{
|
||||||
if ($this->process->isReloading) {
|
if ($this->isReloading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->process->isReloading = true;
|
$this->isReloading = true;
|
||||||
|
|
||||||
$this->process->trigger_reload();
|
$this->process->trigger_reload();
|
||||||
$this->clearWatch();
|
$this->clearWatch();
|
||||||
@@ -93,7 +96,7 @@ class Inotify
|
|||||||
$this->watch($root);
|
$this->watch($root);
|
||||||
}
|
}
|
||||||
$this->process->int = -1;
|
$this->process->int = -1;
|
||||||
$this->process->isReloading = FALSE;
|
$this->isReloading = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user