Module: ActiveJob::Retriable::ClassMethods
- Defined in:
- lib/active_job/retriable.rb
Instance Attribute Summary collapse
-
#retry_max ⇒ Object
Returns the value of attribute retry_max.
Instance Method Summary collapse
- #after_exception(*filters, &blk) ⇒ Object
- #around_exception(*filters, &blk) ⇒ Object
- #before_exception(*filters, &blk) ⇒ Object
- #max_retry(max) ⇒ Object
Instance Attribute Details
#retry_max ⇒ Object
Returns the value of attribute retry_max.
55 56 57 |
# File 'lib/active_job/retriable.rb', line 55 def retry_max @retry_max end |
Instance Method Details
#after_exception(*filters, &blk) ⇒ Object
65 66 67 |
# File 'lib/active_job/retriable.rb', line 65 def after_exception(*filters, &blk) set_callback :exception, :after, *filters, &blk end |
#around_exception(*filters, &blk) ⇒ Object
69 70 71 |
# File 'lib/active_job/retriable.rb', line 69 def around_exception(*filters, &blk) set_callback :exception, :around, *filters, &blk end |
#before_exception(*filters, &blk) ⇒ Object
61 62 63 |
# File 'lib/active_job/retriable.rb', line 61 def before_exception(*filters, &blk) set_callback :exception, :before, *filters, &blk end |
#max_retry(max) ⇒ Object
57 58 59 |
# File 'lib/active_job/retriable.rb', line 57 def max_retry(max) self.retry_max = max || 0 end |