This commit is contained in:
2021-11-04 17:56:39 +08:00
parent 7d2c2cf7ff
commit 187b4311eb
@@ -60,9 +60,6 @@ class FileChangeCustomProcess extends Command
$driver = Kiri::getDi()->get(Inotify::class, [$this->dirs, $this]); $driver = Kiri::getDi()->get(Inotify::class, [$this->dirs, $this]);
} }
$make = Barrier::make(); $make = Barrier::make();
go(function () {
$this->trigger_reload();
});
go(function () { go(function () {
$sign = Coroutine::waitSignal(SIGTERM, -1); $sign = Coroutine::waitSignal(SIGTERM, -1);
if ($sign) { if ($sign) {
@@ -72,6 +69,9 @@ class FileChangeCustomProcess extends Command
go(function () use ($driver) { go(function () use ($driver) {
$driver->start(); $driver->start();
}); });
go(function () {
proc_open("php " . APP_PATH . "kiri.php sw:server start", [], $pipes);
});
Barrier::wait($make); Barrier::wait($make);
return 0; return 0;
} }