Class: God::Conditions::ProcessRunning

Class | God::Conditions::ProcessRunning
In: | lib/god/conditions/process_running.rb
Parent: | PollCondition

Condition Symbol :process_running Type: Poll

Trigger when a process is running or not running depending on attributes.

Paramaters

      Required
        +pid_file+ is the pid file of the process in question. Automatically
                   populated for Watches.
        +running" specifies whether you want to trigger if the process is
                  running (true) or whether it is not running (false)

Examples

Trigger if process IS NOT running (from a Watch):

      on.condition(:process_running) do |c|
        c.running = false
      end

Trigger if process IS running (from a Watch):

      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

### Methods

pid test valid?

### Attributes

pid_file | [RW] |
running | [RW] |

### Public Instance methods

pid()
test()
valid?()

[Validate]