Class: Sanford::Worker
- Inherits:
-
Object
- Object
- Sanford::Worker
- Defined in:
- lib/sanford/worker.rb
Defined Under Namespace
Classes: ProcessedService, SummaryLine
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(host_data, connection) ⇒ Worker
constructor
A new instance of Worker.
- #run ⇒ Object
Constructor Details
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
14 15 16 |
# File 'lib/sanford/worker.rb', line 14 def logger @logger end |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/sanford/worker.rb', line 22 def run processed_service = nil self.log_received benchmark = Benchmark.measure do processed_service = self.run! end processed_service.time_taken = self.round_time(benchmark.real) self.log_complete(processed_service) self.raise_if_debugging!(processed_service.exception) processed_service end |