diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-03-11 14:31:28 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-03-11 14:31:28 -0700 |
commit | 97c889fff07528b22745b2f59f64e29b43746644 (patch) | |
tree | cda840ce6ff99016a64e46e4679dd9d2479c7437 /lib/chef/client.rb | |
parent | df23dbbda7d4eb621804f004ff85181d83a11641 (diff) | |
download | chef-97c889fff07528b22745b2f59f64e29b43746644.tar.gz |
remove register_reporters
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r-- | lib/chef/client.rb | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 3c1921e8dc..466d785d00 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -373,17 +373,6 @@ class Chef signing_key_filename: config[:client_key], validate_utf8: false) end - # Resource reporters send event information back to the chef server for - # processing. Can only be called after we have a @rest object - # @api private - def register_reporters - [ - Chef::ResourceReporter.new(rest_clean) - ].each do |r| - events.register(r) - end - end - # # Callback to fire notifications that the Chef run is starting # @@ -635,7 +624,9 @@ class Chef signing_key_filename: config[:client_key]) # force initialization of the rest_clean API object rest_clean(client_name, config) - register_reporters + # FIXME: we could initialize rest_clean much earlier and hang it off of the run_status and then + # have the ResourceReporter pull it off of the run_status and eliminate this tight coupling. + events.register(Chef::ResourceReporter.new(rest_clean)) rescue Exception => e # TODO this should probably only ever fire if we *started* registration. # Move it to the block above. |