Laravel check if artisan command is running which triggers an SSE

Viewed 635

I'm using a privately made SDK by some company where I have to get messages from using an SSE stream. Right now I run my function in my controller which sends a GET to the server and keeps the connection alive. I'm triggering this from my console. I've made a command php artisan fetch:messages which starts calls my controller method and starts the connection.

Right now, if I close my console the SSE stream also closes. How can I keep this alive when I'm away? Because this has to be active at all times.

I tried making a laravel schedule that triggers php artisan fetch:messages command every few minutes but I cannot see if the previous command is active or not.

0 Answers
Related