Skip to content
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
Merged

Search for update only once per run #14

merged 1 commit into from Aug 7, 2015

Conversation

Annih
Copy link
Contributor

@Annih 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|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, using the run_state

@brugidou
Copy link
Contributor

brugidou commented Aug 7, 2015

+1

Keep the update found in a class variable, to avoid to search twice.
@Annih Annih merged commit 3cacd30 into master Aug 7, 2015
@Annih Annih deleted the search_update_once branch August 7, 2015 10:12
@Annih Annih restored the search_update_once branch August 7, 2015 10:22
@Annih Annih deleted the search_update_once branch August 7, 2015 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants