New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search for update only once per run #14

Merged
merged 1 commit into from Aug 7, 2015

Conversation

Projects
None yet
2 participants
@Annih
Copy link
Contributor

Annih commented Aug 5, 2015

Keep the update found in a class variable, to avoid to search twice.

@@ -79,7 +79,7 @@ def assert_result(action, result)
end

def updates
@updates ||= [].tap do |updates|
@@updates ||= [].tap do |updates|

This comment has been minimized.

@brugidou

brugidou Aug 5, 2015

Contributor

using run_context should be better here than class variables, especially when chef run as a service daemon

This comment has been minimized.

@Annih

Annih Aug 6, 2015

Contributor

Ok, using the run_state

@Annih Annih force-pushed the search_update_once branch from 5c9b46f to 6f5469c Aug 6, 2015

@brugidou

This comment has been minimized.

Copy link
Contributor

brugidou commented Aug 7, 2015

+1

Search for update only once per run
Keep the update found in a class variable, to avoid to search twice.

@Annih Annih force-pushed the search_update_once branch from 6f5469c to 3cacd30 Aug 7, 2015

@Annih Annih merged commit 3cacd30 into master Aug 7, 2015

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@Annih Annih deleted the search_update_once branch Aug 7, 2015

@Annih Annih restored the search_update_once branch Aug 7, 2015

@Annih Annih deleted the search_update_once branch Aug 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment