diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2017-11-27 12:50:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-27 12:50:48 -0500 |
commit | 469b799212d040ef1b8b99e43ebb56759a627533 (patch) | |
tree | a808aade13e71e6768194b1aa4b8bcbedd5a2d7e | |
parent | 437594e25b1bdcd5c5b0af3b2dbfcf7dac6749b8 (diff) | |
parent | 06ac75e6068501ed262035382bc3e1ae0ca45063 (diff) | |
download | chef-469b799212d040ef1b8b99e43ebb56759a627533.tar.gz |
Merge pull request #6574 from coderanger/run-status-derp
Makes life easier for hook authors switching from the older report handler syntax
-rw-r--r-- | lib/chef/client.rb | 4 | ||||
-rw-r--r-- | lib/chef/event_dispatch/base.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 1211e9425e..786ed2c4fc 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -299,7 +299,7 @@ class Chef run_status.stop_clock Chef::Log.info("Chef Run complete in #{run_status.elapsed_time} seconds") run_completed_successfully - events.run_completed(node) + events.run_completed(node, run_status) # keep this inside the main loop to get exception backtraces end_profiling @@ -315,7 +315,7 @@ class Chef run_status.exception = run_error run_failed end - events.run_failed(run_error) + events.run_failed(run_error, run_status) ensure Chef::RequestID.instance.reset_request_id @run_status = nil diff --git a/lib/chef/event_dispatch/base.rb b/lib/chef/event_dispatch/base.rb index 0f8013f114..0886d63152 100644 --- a/lib/chef/event_dispatch/base.rb +++ b/lib/chef/event_dispatch/base.rb @@ -36,11 +36,11 @@ class Chef end # Called at the end a successful Chef run. - def run_completed(node) + def run_completed(node, run_status) end # Called at the end of a failed Chef run. - def run_failed(exception) + def run_failed(exception, run_status) end # Called right after ohai runs. |