eee
This commit is contained in:
@@ -74,8 +74,8 @@ class HotReload extends AbstractProcess
|
|||||||
*/
|
*/
|
||||||
public function process(Process|null $process): void
|
public function process(Process|null $process): void
|
||||||
{
|
{
|
||||||
|
$this->pipe = inotify_init();
|
||||||
$this->addListen();
|
$this->addListen();
|
||||||
|
|
||||||
Event::add($this->pipe, function () use ($process) {
|
Event::add($this->pipe, function () use ($process) {
|
||||||
$read = inotify_read($this->pipe);
|
$read = inotify_read($this->pipe);
|
||||||
|
|
||||||
@@ -126,7 +126,6 @@ class HotReload extends AbstractProcess
|
|||||||
*/
|
*/
|
||||||
protected function addListen(): void
|
protected function addListen(): void
|
||||||
{
|
{
|
||||||
$this->pipe = inotify_init();
|
|
||||||
foreach (config('reload.listen') as $value) {
|
foreach (config('reload.listen') as $value) {
|
||||||
$this->readDirectory($value);
|
$this->readDirectory($value);
|
||||||
}
|
}
|
||||||
@@ -138,6 +137,7 @@ class HotReload extends AbstractProcess
|
|||||||
*/
|
*/
|
||||||
protected function clear(): void
|
protected function clear(): void
|
||||||
{
|
{
|
||||||
|
var_dump($this->watches);
|
||||||
foreach ($this->watches as $key => $watch) {
|
foreach ($this->watches as $key => $watch) {
|
||||||
inotify_rm_watch($this->pipe, $key);
|
inotify_rm_watch($this->pipe, $key);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user