README.md in bluepill-0.0.63 vs README.md in bluepill-0.0.64
- old
+ new
@@ -85,9 +85,22 @@
process.checks :file_time, :every => 60.seconds, :below => 3.minutes, :filename => "/tmp/some_file.log", :times => 2
end
end
```
+To restart process if it's running too long:
+
+```ruby
+ Bluepill.application("app_name") do |app|
+ app.process("process_name") do |process|
+ process.start_command = "/usr/bin/some_start_command"
+ process.pid_file = "/tmp/some_pid_file.pid"
+
+ process.checks :running_time, :every => 10.minutes, :below => 24.hours
+ end
+ end
+ ```
+
We can tell bluepill to give a process some grace time to start/stop/restart before resuming monitoring:
```ruby