Closed mwpastore closed 6 years ago
Yeah, this doesn't work. It looks like keypresses are case-insensitive! I'm looking into it.
There we go. Not sure why Travis is failing; the tests run fine on my local machine. Thanks Alex!
Thanks for the patch!
Hi Alex,
I'm using rerun with Puma and have run into a few issues that this PR hopefully addresses.
I like to use the
--restart
option with--signal USR2
to let Puma quickly restart itself. This works during development, but when you go to quit out of it (i.e. a "q" keypress or Ctrl-C), it first sends a USR2 (which restarts Puma!) before timing out and eventually sending an INT. In the past I have monkeypatched in astop_without_signal
method using an execute-around pattern to "fix" this, but I think this is a better option.stop
now looks to see if you're using the restart option and sends a TERM straightaway instead of the configured signal.All that being said, there are times when you actually do want to the default behavior of rerun, which is to completely stop Puma and restart it. Specifically, if you update your bundle or any environment variables (e.g. in
.env
or.rbenv-vars
). I've added an "f" keypress that does a "forced restart", which is the same as a restart but bypasses therestart_with_signal
logic if restart is enabled.Please let me know your thoughts. Thank you!
Mike