Class | God::Conditions::ProcessRunning |
In: |
lib/god/conditions/process_running.rb
|
Parent: | PollCondition |
Trigger when a process is running or not running depending on attributes.
Examples
# Trigger if process IS NOT running. on.condition(:process_running) do |c| c.running = false end # Trigger if process IS running. on.condition(:process_running) do |c| c.running = true end # Non-Watch Tasks must specify a PID file. on.condition(:process_running) do |c| c.running = false c.pid_file = "/var/run/mongrel.3000.pid" end
pid_file | [RW] | Public: The String PID file location of the process in question. Automatically populated for Watches. |
running | [RW] | Public: The Boolean specifying whether you want to trigger if the process is running (true) or if it is not running (false). |