Class God::Task
In: lib/god/task.rb
Parent: Object

Methods

Attributes

autostart  [W] 
behaviors  [RW]  api
directory  [RW]  api
driver  [RW] 
group  [RW] 
initial_state  [RW] 
interval  [RW] 
metrics  [RW]  api
name  [RW] 
state  [RW]  api
valid_states  [RW] 

Public Class methods

Public Instance methods

Perform the given action

  +a+ is the action Symbol
  +c+ is the Condition

Returns Task (self)

Format the destination specification for use in debug logging

  +metric+ is the Metric
  +condition+ is the Condition

Returns String

Asynchronously evaluate and handle the given event condition. Handles logging notifications, and moving to the new state if necessary

  +condition+ is the Condition to handle

Returns nothing

Evaluate and handle the given poll condition. Handles logging notifications, and moving to the new state if necessary

  +condition+ is the Condition to handle

Returns nothing

Log info about the condition and return the list of messages logged

  +watch+ is the Watch
  +metric+ is the Metric
  +condition+ is the Condition
  +result+ is the Boolean result of the condition test evaluation

Returns String[]

Enable monitoring

Returns nothing

Move to the givent state

  +to_state+ is the Symbol representing the state to move to

Returns Task (self)

Notify all recipeients of the given condition with the specified message

  +condition+ is the Condition
  +message+ is the String message to send

Returns nothing

Registration

Define a transition handler which consists of a set of conditions

Notify the Driver that an EventCondition has triggered

Returns nothing

Determine whether a trigger happened

  +metric+ is the Metric
  +result+ is the result from the condition's test

Returns Boolean

Disable monitoring

Returns nothing

[Validate]