class Liebre::Actor::Publisher::Reporter
Attributes
context[R]
Public Class Methods
new(context)
click to toggle source
# File lib/liebre/actor/publisher/reporter.rb, line 6 def initialize context @context = context end
Public Instance Methods
on_clean() { || ... }
click to toggle source
# File lib/liebre/actor/publisher/reporter.rb, line 33 def on_clean yield rescue Exception => error logger.error("Error cleaning publisher: #{name}\n#{error.message}\n#{error.backtrace}") raise error end
on_publish() { || ... }
click to toggle source
# File lib/liebre/actor/publisher/reporter.rb, line 18 def on_publish yield rescue Exception => error logger.error("Error publising: #{name}\n#{error.message}\n#{error.backtrace}") raise error end
on_start() { || ... }
click to toggle source
# 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.message}\n#{error.backtrace}") raise error end
on_stop() { || ... }
click to toggle source
# 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.message}\n#{error.backtrace}") raise error end
Private Instance Methods
logger()
click to toggle source
# File lib/liebre/actor/publisher/reporter.rb, line 46 def logger @logger ||= context.logger end
name()
click to toggle source
# File lib/liebre/actor/publisher/reporter.rb, line 42 def name @name ||= context.name.inspect end