Class | Chef::RunStatus
In: | lib/chef/run_status.rb
Parent: | Object

## Chef::RunStatus

Tracks various aspects of a Chef run, including the Node and RunContext, start and end time, and any Exception that stops the run. RunStatus objects are passed to any notification or exception handlers at the completion of a Chef run.

### Methods

all_resources backtrace elapsed_time failed? formatted_exception new node start_clock stop_clock success? to_hash updated_resources

### Attributes

end_time | [R] |
exception | [R] |
exception | [W] |
run_context | [R] |
run_context | [W] |
start_time | [R] |

### Public Class methods

new(node)

### Public Instance methods

all_resources()

The list of all resources in the current run context‘s `resource_collection`

backtrace()

The backtrace from `exception`, if any

elapsed_time()

The elapsed time between `start_time` and `end_time`. Returns `nil` if either value is not set.

failed?()

Did the Chef run fail?

formatted_exception()

Returns a string of the format "ExceptionClass: message" or `nil` if no `exception` is set.

node()
start_clock()

sets `start_time` to the current time.

stop_clock()

sets `end_time` to the current time

success?()

Did the chef run succeed? returns `true` if no exception has been set.

to_hash()

A Hash representation of the RunStatus, with the following (Symbol) keys:

- :node
- :success
- :start_time
- :end_time
- :elapsed_time
- :all_resources
- :updated_resources
- :exception
- :backtrace

updated_resources()

The list of all resources in the current run context‘s `resource_collection` that are marked as updated

[Validate]