改名
This commit is contained in:
@@ -63,7 +63,6 @@ class Inotify
|
|||||||
if ($this->process->isReloading) {
|
if ($this->process->isReloading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->process->isReloading = true;
|
|
||||||
|
|
||||||
$LISTEN_TYPE = [IN_CREATE, IN_DELETE, IN_MODIFY, IN_MOVED_TO, IN_MOVED_FROM];
|
$LISTEN_TYPE = [IN_CREATE, IN_DELETE, IN_MODIFY, IN_MOVED_TO, IN_MOVED_FROM];
|
||||||
foreach ($events as $ev) {
|
foreach ($events as $ev) {
|
||||||
@@ -72,7 +71,6 @@ class Inotify
|
|||||||
}
|
}
|
||||||
//非重启类型
|
//非重启类型
|
||||||
if (str_ends_with($ev['name'], '.php')) {
|
if (str_ends_with($ev['name'], '.php')) {
|
||||||
sleep(1);
|
|
||||||
$this->reload();
|
$this->reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -83,6 +81,12 @@ class Inotify
|
|||||||
*/
|
*/
|
||||||
public function reload()
|
public function reload()
|
||||||
{
|
{
|
||||||
|
if ($this->process->isReloading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->process->isReloading = true;
|
||||||
|
|
||||||
$this->process->trigger_reload();
|
$this->process->trigger_reload();
|
||||||
$this->clearWatch();
|
$this->clearWatch();
|
||||||
foreach ($this->dirs as $root) {
|
foreach ($this->dirs as $root) {
|
||||||
|
|||||||
Reference in New Issue
Block a user