我有以下上帝配置文件。
在这里我有几个问题,你能帮我吗:
1 - w.interval 和 c.interval 会做什么?
2 - 我想让我的守护进程保持活动状态(w.keepalive),如何将它添加到我的代码中?这里还有一件事是当它调用keepalive时我想睡60秒左右然后开始,有可能吗?
DIR = "/home/guest/god"
God.pid_file_directory = DIR
God.watch do |w|
w.name = "Test"
w.start = "sh /home/guest/god/test.sh"
w.pid_file = File.join(DIR, 'test.pid')
w.behavior(:clean_pid_file)
w.interval = 10.seconds
w.start_if do |start|
start.condition(:process_running) do |c|
puts "Inside start condition"
c.interval = 5.seconds
c.running = false
end
end
end