spatie / laravel-horizon-watcher

Automatically restart Horizon when local PHP files change
https://spatie.be/open-source
MIT License
218 stars 15 forks source link

Multiple horizon instances are started #7

Closed sdapkus closed 1 year ago

sdapkus commented 1 year ago

Hi,

Not 100% sure if it's a package bug, or my setup.

When I start horizon watcher, after it detects a change, it tries to terminate horizon instance and start another one. But it fails to stop running instance and just starts new one. After some changes I get multiple instances running.

I've tried debugging a bit myself, I ended up outputting exit code from $this->horizonProcess->stop() and it was 143 => 'Termination (request to terminate)',. It doesn't seem okay, but not sure how to fix it. Tried specifying different signal, but exit code was always the same.

I'm using Mac with Laravel Sail.