-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.rb
18 lines (18 loc) · 919 Bytes
/
configuration.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Backburner.configure do |config|
config.beanstalk_url = "beanstalk://127.0.0.1"
config.tube_namespace = "some.app.production"
config.namespace_separator = "."
config.on_error = lambda { |e| puts e }
config.max_job_retries = 0 # default 0 retries
config.retry_delay = 2 # default 5 seconds
config.retry_delay_proc = lambda { |min_retry_delay, num_retries| min_retry_delay + (num_retries ** 3) }
config.default_priority = 65536
config.respond_timeout = 120
config.default_worker = Backburner::Workers::ThreadsOnFork
config.logger = Logger.new(STDOUT)
config.primary_queue = "backburner-jobs"
config.priority_labels = { :custom => 50, :useless => 1000 }
config.reserve_timeout = nil
config.job_serializer_proc = lambda { |body| JSON.dump(body) }
config.job_parser_proc = lambda { |body| JSON.parse(body) }
end