delayed_job_with_named_queues 2.0.7.2 → 2.0.7.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ module Delayed
18
18
 
19
19
  priority = args.first || Delayed::Worker.default_priority
20
20
  run_at = args[1]
21
- queue = args[2]
21
+ queue = args[2] || Delayed::Worker.default_queue
22
22
  self.create(:payload_object => object, :priority => priority.to_i, :run_at => run_at, :queue => queue)
23
23
  end
24
24
 
@@ -3,11 +3,12 @@ require 'active_support/core_ext/numeric/time'
3
3
 
4
4
  module Delayed
5
5
  class Worker
6
- cattr_accessor :min_priority, :max_priority, :max_attempts, :max_run_time, :default_priority, :sleep_delay, :logger, :queues
6
+ cattr_accessor :min_priority, :max_priority, :max_attempts, :max_run_time, :default_priority, :sleep_delay, :logger, :queues, :default_queue
7
7
  self.sleep_delay = 5
8
8
  self.max_attempts = 25
9
9
  self.max_run_time = 4.hours
10
10
  self.default_priority = 0
11
+ self.default_queue = nil
11
12
  self.queues = []
12
13
 
13
14
  # By default failed jobs are destroyed after too many attempts. If you want to keep them around
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_with_named_queues
3
3
  version: !ruby/object:Gem::Version
4
- hash: 119
5
- prerelease:
4
+ hash: 117
5
+ prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
9
  - 7
10
- - 2
11
- version: 2.0.7.2
10
+ - 3
11
+ version: 2.0.7.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Ray Walters
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-12-28 00:00:00 -08:00
20
+ date: 2012-01-06 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -306,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
306
  requirements: []
307
307
 
308
308
  rubyforge_project:
309
- rubygems_version: 1.4.2
309
+ rubygems_version: 1.3.7
310
310
  signing_key:
311
311
  specification_version: 3
312
312
  summary: Database-backed asynchronous priority queue system -- Extracted from Shopify