diff --git a/src/SupervisorProcess.php b/src/SupervisorProcess.php index f99327de..8230100d 100644 --- a/src/SupervisorProcess.php +++ b/src/SupervisorProcess.php @@ -4,6 +4,7 @@ use Closure; use Laravel\Horizon\Contracts\HorizonCommandQueue; +use Laravel\Horizon\Contracts\SupervisorRepository; use Laravel\Horizon\MasterSupervisorCommands\AddSupervisor; use Laravel\Horizon\SupervisorCommands\Terminate; @@ -112,6 +113,10 @@ public function monitor() */ protected function reprovision() { + if (isset($this->name)) { + app(SupervisorRepository::class)->forget($this->name); + } + app(HorizonCommandQueue::class)->push( MasterSupervisor::commandQueue(), AddSupervisor::class,