lib/backburner/allq_wrapper.rb in backburner-allq-1.0.20 vs lib/backburner/allq_wrapper.rb in backburner-allq-1.0.21

- old
+ new

@@ -79,10 +79,11 @@ { 'expireds' => expireds, 'releases' => releases } end end class AllQWrapper + DEFAULT_TIMEOUT = 17800 def initialize(url = 'localhost:8090') allq_conf = Allq::Configuration.new do |config| config.host = url end @@ -180,11 +181,11 @@ end def build_new_job(body, options) adjusted_priority = map_priority(options[:pri] || 5) - ttl = options[:ttl] || 600 + ttl = options[:ttl] || options[:ttr] || DEFAULT_TIMEOUT tube_name = options[:tube_name] || 'default' delay = options[:delay] || 0 parent_id = options[:parent_id] new_job = Allq::NewJob.new(tube: tube_name, @@ -197,10 +198,10 @@ new_job end def build_new_parent_job(body, options) adjusted_priority = map_priority(options[:pri] || 5) - ttl = options[:ttl] || 600 + ttl = options[:ttl] || options[:ttr] || DEFAULT_TIMEOUT tube_name = options[:tube_name] || 'default' delay = options[:delay] || 0 parent_id = options[:parent_id] limit = options[:limit] timeout = options[:timeout] || 3_600