class Backburner::Configuration
Constants
- PRIORITY_LABELS
Attributes
allq_url[RW]
default_priority[RW]
default_queues[RW]
default_worker[RW]
job_parser_proc[RW]
job_serializer_proc[RW]
logger[RW]
max_job_retries[RW]
namespace_separator[R]
on_error[RW]
primary_queue[RW]
priority_labels[RW]
reserve_timeout[RW]
respond_timeout[RW]
retry_delay[RW]
retry_delay_proc[RW]
tube_namespace[RW]
Public Class Methods
new()
click to toggle source
# File lib/backburner/configuration.rb, line 23 def initialize @allq_url = "allq://127.0.0.1:8091" @tube_namespace = "backburner" @namespace_separator = "." @default_priority = 5 @respond_timeout = 120 @on_error = nil @max_job_retries = 1 @retry_delay = 5 @retry_delay_proc = lambda { |min_retry_delay, num_retries| min_retry_delay + (num_retries ** 3) } @default_queues = [] @logger = nil @default_worker = Backburner::Workers::Simple @primary_queue = "backburner-jobs" @priority_labels = PRIORITY_LABELS @reserve_timeout = nil @job_serializer_proc = lambda { |body| body.to_json } @job_parser_proc = lambda { |body| JSON.parse(body) } end
Public Instance Methods
namespace_separator=(val)
click to toggle source
# File lib/backburner/configuration.rb, line 43 def namespace_separator=(val) raise 'Namespace separator cannot used reserved queue configuration separator ":"' if val == ':' @namespace_separator = val end