modify plugin name

This commit is contained in:
2022-02-15 12:17:11 +08:00
parent 4f54e5bdf8
commit 106e84914d
3 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -203,7 +203,7 @@ class HotReload extends Command
*/ */
public function trigger_reload(string $path = '') public function trigger_reload(string $path = '')
{ {
$this->logger->warning('change reload'); $this->logger->warning('restart');
if (!empty($path) && str_starts_with($path, CONTROLLER_PATH)) { if (!empty($path) && str_starts_with($path, CONTROLLER_PATH)) {
$pid = file_get_contents(storage('.swoole.pid')); $pid = file_get_contents(storage('.swoole.pid'));
if (!empty($pid) && Process::kill($pid, 0)) { if (!empty($pid) && Process::kill($pid, 0)) {
+3
View File
@@ -3,6 +3,7 @@
namespace Kiri\FileListen; namespace Kiri\FileListen;
use Exception; use Exception;
use Kiri\Error\Logger;
use Swoole\Event; use Swoole\Event;
use Swoole\Timer; use Swoole\Timer;
@@ -102,6 +103,8 @@ class Inotify
*/ */
public function reload($path) public function reload($path)
{ {
\Kiri::getDi()->get(Logger::class)->warning('file change');
$this->process->trigger_reload($path); $this->process->trigger_reload($path);
$this->process->int = -1; $this->process->int = -1;
+3
View File
@@ -3,6 +3,7 @@
namespace Kiri\FileListen; namespace Kiri\FileListen;
use Exception; use Exception;
use Kiri\Error\Logger;
class Scaner class Scaner
{ {
@@ -112,6 +113,8 @@ class Scaner
{ {
$this->isReloading = TRUE; $this->isReloading = TRUE;
\Kiri::getDi()->get(Logger::class)->warning('file change');
$this->process->trigger_reload($path); $this->process->trigger_reload($path);
$this->loadDirs(); $this->loadDirs();