This commit is contained in:
2021-04-19 14:35:00 +08:00
parent 6283104b1a
commit d5c8ad8f9b
+1 -7
View File
@@ -12,10 +12,7 @@ namespace Snowflake\Process;
use Exception; use Exception;
use Snowflake\Abstracts\Config; use Snowflake\Abstracts\Config;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\ConfigException;
use Snowflake\Snowflake; use Snowflake\Snowflake;
use Swoole\Coroutine;
use Swoole\Event; use Swoole\Event;
use Swoole\Timer; use Swoole\Timer;
@@ -48,10 +45,7 @@ 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;
foreach ($this->dirs as $dir) { $this->watch(APP_PATH);
if (!is_dir($dir)) continue;
$this->watch($dir);
}
Event::add($this->inotify, [$this, 'check']); Event::add($this->inotify, [$this, 'check']);
Event::wait(); Event::wait();
} else { } else {