Class: Axn::Async::ExceptionReporting::DiscardedJobAction
- Inherits:
-
Object
- Object
- Axn::Async::ExceptionReporting::DiscardedJobAction
- Defined in:
- lib/axn/async/exception_reporting.rb
Overview
Proxy action for discarded/dead job reporting that mimics an Axn action instance. Provides the interface expected by on_exception handlers.
Instance Method Summary collapse
- #class ⇒ Object
-
#initialize(action_class, exception) ⇒ DiscardedJobAction
constructor
A new instance of DiscardedJobAction.
- #log(message) ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(action_class, exception) ⇒ DiscardedJobAction
Returns a new instance of DiscardedJobAction.
41 42 43 44 |
# File 'lib/axn/async/exception_reporting.rb', line 41 def initialize(action_class, exception) @action_class = action_class @exception = exception end |
Instance Method Details
#class ⇒ Object
54 55 56 |
# File 'lib/axn/async/exception_reporting.rb', line 54 def class @action_class end |
#log(message) ⇒ Object
46 47 48 |
# File 'lib/axn/async/exception_reporting.rb', line 46 def log() Axn.config.logger.warn("[Axn::DiscardedJob] #{}") end |
#result ⇒ Object
50 51 52 |
# File 'lib/axn/async/exception_reporting.rb', line 50 def result @result ||= DiscardedJobResult.new(@exception) end |