sidekiq-dynamic-queues 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 0.5.3
2
+ -----
3
+
4
+ uses default queue when wildcard expands empty <bf8fbb6> [Matt Conway]
5
+
1
6
  0.5.2
2
7
  -----
3
8
 
@@ -21,6 +21,7 @@ module Sidekiq
21
21
  else
22
22
  queues = expanded_queues
23
23
  queues = @strictly_ordered_queues ? queues : queues.shuffle
24
+ queues << "queue:default" if queues.size == 0
24
25
  queues << Sidekiq::Fetcher::TIMEOUT
25
26
  end
26
27
  end
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module DynamicQueues
3
- VERSION = "0.5.2"
3
+ VERSION = "0.5.3"
4
4
  end
5
5
  end
@@ -8,7 +8,8 @@ describe "Dynamic Queues" do
8
8
  def watch_queues(*queues)
9
9
  Sidekiq.redis do |r|
10
10
  queues.each {|q| r.sadd('queues', q) }
11
- end
11
+ r.del('queues') if queues.size == 0
12
+ end
12
13
  end
13
14
 
14
15
  before(:each) do
@@ -92,6 +93,12 @@ describe "Dynamic Queues" do
92
93
  before(:each) do
93
94
  watch_queues(*%w[high_x foo high_y superhigh_z])
94
95
  end
96
+
97
+ it "uses default when wildcard empty" do
98
+ watch_queues()
99
+ fetch = Fetch.new(:queues => %w[*], :strict => true)
100
+ fetch.queues_cmd.should eq ["queue:default", SFTO]
101
+ end
95
102
 
96
103
  it "can specify simple queues" do
97
104
  fetch = Fetch.new(:queues => %w[foo], :strict => true)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sidekiq-dynamic-queues
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.2
5
+ version: 0.5.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Matt Conway