2

We actually use God in our development environment, as well as in production, simply because it makes managing unicorn/resque etc simpler.

I've just scaled down our default unicorn config to a single worker in dev, as most of the time this is enough. However, I've added shell scripts wrapping the commands:

# Add an extra unicorn worker
kill -TTIN `cat /path/to/unicorn.pid`

# Remove a unicorn worker
kill -TTOU `cat /path/to/unicorn.pid`

Rather than starting/stopping/restarting unicorn with god, but adding new workers through an ad-hoc shell script, is there a way to have God support a couple of custom commands, like:

god incr unicorn

god decr unicorn

I looked in the documentation and found nothing, but it feels like something it would probably 'unofficially' be able to do.

d11wtq
  • 34,788
  • 19
  • 120
  • 195
  • 1
    [Insert hopefully tasteful joke about deities and mythological animals here.](http://stackoverflow.com/questions/3877178/using-god-to-monitor-unicorn-start-exited-with-non-zero-code-1) – BoltClock Apr 18 '12 at 22:57
  • 3
    Ruby hipsters gotta love silly gem names :) One day somebody will make a gem called something like 'penis', and it will actually be useful, we'll all end up having to just deal with it, keeping a straight face. – d11wtq Apr 18 '12 at 23:01
  • 1
    Note to ruby hipsters: pick names that are easier to google. – ergosys Apr 18 '12 at 23:01
  • 1
    @ergosys Note to self: come up with some names that are hard to google. – scientiaesthete Apr 18 '12 at 23:05

0 Answers0