Radical Restarts refactor: unify Pulse restart handling
We’re handing Pulse restarts differently in several places and it is causing unpredictable and unstable behaviour.
So, it’s time for a ‘Radical Restarts’ refactor, where we manage restarts only from one place, the PulseProcess class:
-
Set env var on STNORESTART when starting Pulse
-
On 'close' event, restart Pulse.
-
The only way to really, truly, actually kill Pulse is to call the
.stop()
method on Pulse Process.
Then, everywhere else, where we are calling restart()
on the Pulse API, call shutdown()
instead.
This should fix:
- The multiple Pulse processes issue.
- The Pulse dying and not coming back to life issue.