sidekiq-limit_fetch 0.8 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,6 +37,7 @@ class Sidekiq::LimitFetch
37
37
  end
38
38
 
39
39
  def redis_blpop(*args)
40
+ return if args.size < 2
40
41
  Sidekiq.redis {|it| it.blpop *args }
41
42
  end
42
43
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'sidekiq-limit_fetch'
3
- gem.version = '0.8'
3
+ gem.version = '0.9'
4
4
  gem.authors = 'brainopia'
5
5
  gem.email = 'brainopia@evilmartians.com'
6
6
  gem.summary = 'Sidekiq strategy to support queue limits'
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Sidekiq::LimitFetch::Global::Monitor do
4
4
  let(:global) { true }
5
5
  let(:monitor) { described_class.start! ttl, timeout }
6
- let(:ttl) { 2 }
6
+ let(:ttl) { 3 }
7
7
  let(:queue) { Sidekiq::Queue[name] }
8
8
  let(:name) { 'default' }
9
9
 
@@ -22,7 +22,7 @@ describe Sidekiq::LimitFetch::Global::Monitor do
22
22
  2.times { queue.acquire }
23
23
  described_class.send(:invalidate_old_processors)
24
24
  queue.busy.should == 2
25
- sleep 4
25
+ sleep 5
26
26
  described_class.send(:invalidate_old_processors)
27
27
  queue.busy.should == 0
28
28
  end
data/spec/spec_helper.rb CHANGED
@@ -10,6 +10,7 @@ RSpec.configure do |config|
10
10
  it.del "limit_fetch:limit:#{queue}"
11
11
  it.del "limit_fetch:busy:#{queue}"
12
12
  it.del "limit_fetch:pause:#{queue}"
13
+ it.del "limit_fetch:block:#{queue}"
13
14
  end
14
15
 
15
16
  clean_redis.call(name) if defined?(name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-limit_fetch
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.8'
4
+ version: '0.9'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  segments:
111
111
  - 0
112
- hash: 4297700822520772168
112
+ hash: -145279622185044901
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  none: false
115
115
  requirements:
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  segments:
120
120
  - 0
121
- hash: 4297700822520772168
121
+ hash: -145279622185044901
122
122
  requirements: []
123
123
  rubyforge_project:
124
124
  rubygems_version: 1.8.24