From 06ac75e6068501ed262035382bc3e1ae0ca45063 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Tue, 7 Nov 2017 14:42:48 -0800 Subject: Makes life easier for hook authors switching from the older report handler syntax. Signed-off-by: Noah Kantrowitz --- lib/chef/client.rb | 4 ++-- 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. -- cgit v1.2.1