hi guys, i hope anybody can help, it would be awesome!!
I have been trying to start and monitor backgroundrb with god for 3
days, but still it doesn't work.
If I try to start backgroundrb without god, it works. But when trying
to start backgroundrb with god, it fails.
If i call
:> god log mailit-backgroundrb

after loading god config file, i see that god trys to start
backgroundrb repeatedly, god hooks in the start-transition listed
below. I also tried this with different values for w.interval,
w.start_grace, w.restart_grace (max. value was 5.minutes), but no
success.

General Info:
Server: Debian GNU/Linux 4.0
backgroundrb 1.1
god 0.7.12

Extracts from my god config file:

God.watch do |w|
       script = "#{RAILS_ROOT}/script/backgroundrb"
        w.name = "mailit-backgroundrb"
        w.group = "backgroundrb"
        w.interval = 1.minute
        w.start = "#{script} start" # start Service
        w.stop = "#{script} stop" # stop Service
        w.start_grace = 30.seconds
       w.restart_grace = 30.seconds
        w.pid_file = "#{RAILS_ROOT}/tmp/pids/background_*.pid"
        w.behavior(:clean_pid_file)

Further i use transitions in my watch:

w.transition(:init, {true => :up, false => :start}) do |on|
        on.condition(:process_running) do |c|
                c.running = true
        end
  end

  w.transition([:start, :restart], :up) do |on|
    on.condition(:process_running) do |c|
      c.running = true
    end
    on.condition(:tries) do |c|
      c.times = 5
      c.transition = :start
    end
  end


  w.transition(:up, :start) do |on|
    on.condition(:process_exits)
  end

w.lifecycle do |on|
        on.condition(:flapping) do |c|
                c.to_state = [:start, :restart]
                c.times = 5
                c.within = 5.minute
                c.transition = :unmonitored
                c.retry_in = 10.minutes
                c.retry_times = 5
                c.retry_within = 2.hours
        end
end

end

if anybody has an idea, please post!

Cheers & thanks,
lesreug

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"god.rb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/god-rb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to