Class: Sidekiq::Routing::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/routing/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/sidekiq/routing/configuration.rb', line 15

def initialize
  @enabled = true
  @logger = default_logger
  @parked_queue = PARKED_QUEUE_DEFAULT
  # Where process_parked sends a parked job that has no stamped original queue.
  @process_parked_fallback_queue = "default"
  # Hot-path snapshot freshness. 0 disables caching (read Redis every call).
  @cache_ttl_seconds = 5
  # Recovery defaults: nil limit = move everything; batch_size bounds each pass.
  @batch_limit = nil
  @batch_size = 100
  # Max jobs parked_breakdown scans (the parking queue can hold millions).
  @breakdown_sample_size = 1_000
end

Instance Attribute Details

#batch_limitObject

Returns the value of attribute batch_limit.



6
7
8
# File 'lib/sidekiq/routing/configuration.rb', line 6

def batch_limit
  @batch_limit
end

#batch_sizeObject

Returns the value of attribute batch_size.



6
7
8
# File 'lib/sidekiq/routing/configuration.rb', line 6

def batch_size
  @batch_size
end

#breakdown_sample_sizeObject

Returns the value of attribute breakdown_sample_size.



6
7
8
# File 'lib/sidekiq/routing/configuration.rb', line 6

def breakdown_sample_size
  @breakdown_sample_size
end

#cache_ttl_secondsObject

Returns the value of attribute cache_ttl_seconds.



6
7
8
# File 'lib/sidekiq/routing/configuration.rb', line 6

def cache_ttl_seconds
  @cache_ttl_seconds
end

#enabledObject

Returns the value of attribute enabled.



6
7
8
# File 'lib/sidekiq/routing/configuration.rb', line 6

def enabled
  @enabled
end

#loggerObject

Returns the value of attribute logger.



6
7
8
# File 'lib/sidekiq/routing/configuration.rb', line 6

def logger
  @logger
end

#parked_queueObject

Returns the value of attribute parked_queue.



6
7
8
# File 'lib/sidekiq/routing/configuration.rb', line 6

def parked_queue
  @parked_queue
end

#process_parked_fallback_queueObject

Returns the value of attribute process_parked_fallback_queue.



6
7
8
# File 'lib/sidekiq/routing/configuration.rb', line 6

def process_parked_fallback_queue
  @process_parked_fallback_queue
end