Only restart services with goreman if they're running
Created by: mrnugget
When running ./dev/start.sh
with a modified Procfile
, or passing the
--only
/--except
options to it, the list of running services doesn't
match the list of binaries the watch
command rebuilds.
So what happens is that you modify code, watch
re-compiles the binaries
and runs into an error:
08:54:27 watch | Building with optimizations disabled (for debugging). Make sure you have at least go1.10 installed.
08:54:32 watch | Rebuilt: symbols precise-code-intel-bundle-manager precise-code-intel-worker
08:54:32 watch | goreman: unknown proc: symbols
Because symbols
wasn't running now all three services aren't
restarted.
That cost me a lot of time and caused a ton of facepalms... so here's the fix.