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.
120 121 122 123 |
# File 'lib/axn/async/exception_reporting.rb', line 120 def initialize(action_class, exception) @action_class = action_class @exception = exception end |
Instance Method Details
#class ⇒ Object
133 134 135 |
# File 'lib/axn/async/exception_reporting.rb', line 133 def class @action_class end |
#log(message) ⇒ Object
125 126 127 |
# File 'lib/axn/async/exception_reporting.rb', line 125 def log() Axn.config.logger.warn("[Axn::DiscardedJob] #{}") end |
#result ⇒ Object
129 130 131 |
# File 'lib/axn/async/exception_reporting.rb', line 129 def result @discarded_job_result ||= DiscardedJobResult.new(@exception) end |