rec 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/lib/rec/state.rb +3 -3
- metadata +3 -3
data/CHANGELOG
CHANGED
data/lib/rec/state.rb
CHANGED
@@ -59,7 +59,7 @@ class State
|
|
59
59
|
|
60
60
|
Notify_duration = Proc.new { |state|
|
61
61
|
# We must have only one allstate, which is the original state (eg. "server down")
|
62
|
-
|
62
|
+
original = state.params[:allstates][0] # get the original state's key
|
63
63
|
duration = state.find(original).age
|
64
64
|
# we expect to have :alert containing "%duration$d minutes"
|
65
65
|
state.details["duration"] = duration.to_i()/60 # store the outage duration
|
@@ -70,7 +70,7 @@ class State
|
|
70
70
|
|
71
71
|
Log_duration = Proc.new { |state|
|
72
72
|
# We must have only one allstate, which is the original state (eg. "process started")
|
73
|
-
|
73
|
+
original = state.params[:allstates][0] # get the original state's key
|
74
74
|
duration = state.find(original).age
|
75
75
|
# we expect to have :alert containing "%duration$d minutes"
|
76
76
|
state.details["duration"] = duration.to_i()/60 # store the duration
|
@@ -271,7 +271,7 @@ class State
|
|
271
271
|
|
272
272
|
# Convenience method to find another state, based on parameters in this state
|
273
273
|
def find(template)
|
274
|
-
|
274
|
+
State::find(template, self)
|
275
275
|
end
|
276
276
|
|
277
277
|
# Allow access to any parameter by a convenience method
|
metadata
CHANGED