Class: ActiveJob::Retry::ConstantOptionsValidator
- Inherits:
-
Object
- Object
- ActiveJob::Retry::ConstantOptionsValidator
- Defined in:
- lib/active_job/retry/constant_options_validator.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ ConstantOptionsValidator
constructor
A new instance of ConstantOptionsValidator.
- #validate! ⇒ Object
Constructor Details
#initialize(options) ⇒ ConstantOptionsValidator
Returns a new instance of ConstantOptionsValidator.
6 7 8 |
# File 'lib/active_job/retry/constant_options_validator.rb', line 6 def initialize() = end |
Instance Method Details
#validate! ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/active_job/retry/constant_options_validator.rb', line 10 def validate! validate_limit_numericality! validate_infinite_limit! validate_delay! validate_not_both_exceptions! # Fatal exceptions must be an array (cannot be nil, since then all # exceptions would be fatal - for that just set `limit: 0`) validate_array_of_exceptions!(:fatal_exceptions) # Retryable exceptions must be an array of exceptions or `nil` to retry # any exception if [:retryable_exceptions] validate_array_of_exceptions!(:retryable_exceptions) end end |