Skip to content

Commit

Permalink
Search for update only once per run
Browse files Browse the repository at this point in the history
Keep the update found in a class variable, to avoid to search twice.
  • Loading branch information
Annih committed Aug 6, 2015
1 parent 0ad26b6 commit 6f5469c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/update.rb
Expand Up @@ -79,7 +79,7 @@ def assert_result(action, result)
end

def updates
@updates ||= [].tap do |updates|
node.run_state['wsus_client_updates'] ||= [].tap do |updates|
# Searches non installed updates
search_result = session.CreateUpdateSearcher.Search 'IsInstalled=0'
# Transforms to ruby array for future use
Expand Down

0 comments on commit 6f5469c

Please sign in to comment.