Skip to content

Commit

Permalink
Prevent re-running sensu::check every puppet run
Browse files Browse the repository at this point in the history
Similar to j-russell's commit, updated occurrences, low_flap_threshold,
high_flap_threshold attributes, setting them to_s to prevent refreshes on
every run
  • Loading branch information
Scott Klein committed May 31, 2013
1 parent 1409d20 commit c7d1d5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/puppet/provider/sensu_check/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,23 @@ def refresh=(value)
end

def occurrences
conf['checks'][resource[:name]]['occurrences']
conf['checks'][resource[:name]]['occurrences'].to_s
end

def occurrences=(value)
conf['checks'][resource[:name]]['occurrences'] = value.to_i
end

def low_flap_threshold
conf['checks'][resource[:name]]['low_flap_threshold']
conf['checks'][resource[:name]]['low_flap_threshold'].to_s
end

def low_flap_threshold=(value)
conf['checks'][resource[:name]]['low_flap_threshold'] = value.to_i
end

def high_flap_threshold
conf['checks'][resource[:name]]['high_flap_threshold']
conf['checks'][resource[:name]]['high_flap_threshold'].to_s
end

def high_flap_threshold=(value)
Expand Down

0 comments on commit c7d1d5e

Please sign in to comment.