module Sidekiq
Constants
- SIDEKIQ_FAILURES_MODES
Public Class Methods
failures_default_mode()
click to toggle source
Fetches the default failure tracking mode.
# File lib/sidekiq/failures.rb, line 34 def self.failures_default_mode @failures_default_mode || :all end
failures_default_mode=(mode)
click to toggle source
Sets the default failure tracking mode.
The value provided here will be the default behavior but can be overwritten per worker by using `sidekiq_options :failures => :mode`
Defaults to :all
# File lib/sidekiq/failures.rb, line 25 def self.failures_default_mode=(mode) unless SIDEKIQ_FAILURES_MODES.include?(mode.to_sym) raise ArgumentError, "Sidekiq#failures_default_mode valid options: #{SIDEKIQ_FAILURES_MODES}" end @failures_default_mode = mode.to_sym end
failures_max_count()
click to toggle source
Fetches the failures max count value
# File lib/sidekiq/failures.rb, line 50 def self.failures_max_count if !instance_variable_defined?(:@failures_max_count) || @failures_max_count.nil? 1000 else @failures_max_count end end
failures_max_count=(value)
click to toggle source
Sets the maximum number of failures to track
If the number of failures exceeds this number the list will be trimmed (oldest failures will be purged).
Defaults to 1000 Set to false to disable rotation
# File lib/sidekiq/failures.rb, line 45 def self.failures_max_count=(value) @failures_max_count = value end