Class: Liebre::Actor::Publisher::Reporter
- Inherits:
-
Object
- Object
- Liebre::Actor::Publisher::Reporter
- Defined in:
- lib/liebre/actor/publisher/reporter.rb
Instance Method Summary collapse
-
#initialize(context) ⇒ Reporter
constructor
A new instance of Reporter.
- #on_clean ⇒ Object
- #on_publish ⇒ Object
- #on_start ⇒ Object
- #on_stop ⇒ Object
Constructor Details
#initialize(context) ⇒ Reporter
Returns a new instance of Reporter.
6 7 8 |
# File 'lib/liebre/actor/publisher/reporter.rb', line 6 def initialize context @context = context end |
Instance Method Details
#on_clean ⇒ Object
33 34 35 36 37 38 |
# File 'lib/liebre/actor/publisher/reporter.rb', line 33 def on_clean yield rescue Exception => error logger.error("Error cleaning publisher: #{name}\n#{error.}\n#{error.backtrace}") raise error end |
#on_publish ⇒ Object
18 19 20 21 22 23 |
# File 'lib/liebre/actor/publisher/reporter.rb', line 18 def on_publish yield rescue Exception => error logger.error("Error publising: #{name}\n#{error.}\n#{error.backtrace}") raise error end |
#on_start ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/liebre/actor/publisher/reporter.rb', line 10 def on_start yield logger.info("Publisher started: #{name}") rescue Exception => error logger.error("Error starting publisher: #{name}\n#{error.}\n#{error.backtrace}") raise error end |
#on_stop ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/liebre/actor/publisher/reporter.rb', line 25 def on_stop yield logger.info("Publisher stopped: #{name}") rescue Exception => error logger.error("Error stopping publisher: #{name}\n#{error.}\n#{error.backtrace}") raise error end |