How to notify from god only on process crash?

34 Views Asked by At

I'd like to get a notification from god when a process stops as a result of an error, but not otherwise. I'm looking for behavior like this example from doc/god.asciidoc:

w.transition(:up, :start) do |on|
  on.condition(:process_exits) do |c|
    c.notify = 'tom'
  end
end

... except that only triggers if the process exits with a nonzero status. Do I need to write a custom :process_exits_with_error condition? If so, how would I find the exit status?

0

There are 0 best solutions below