sidekiq-limit_fetch 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e8a6ddc4a4cb020d30366ca38fdb24d37b9e07e
4
- data.tar.gz: 9a07783ebae2ec7511d4aada902622bd35f932ef
3
+ metadata.gz: 37b25405100cca644241eb4c1106e31020ceaa71
4
+ data.tar.gz: c6e906b7f2d5553807fcf36082116f5fe7c06824
5
5
  SHA512:
6
- metadata.gz: f605e79b039e63ac427a83849a218e5eddfd00a8fde925cf345844257cd519b101f1d8e18fed6a7aeb3249ac63a59f8f54b36e71f288aaf3a7e96297643e14f3
7
- data.tar.gz: 523ba27f01b7084ca39246d1b00e9ff39a49c7d344083301b9de2f798c4c44bbc9a9157436cac2d27233aa4f513aaddb0a9d4b2c3fbd8162ee060b5ec3ef11ef
6
+ metadata.gz: 0a3eeb2ee0098c67ae2971f4b62c4ab56526ddc1cd943d5cf39869d149baab4014382a6c696959a540d565584801e827facad77aad5286dbc8853aba872808ce
7
+ data.tar.gz: e7f166cb5cbadf788662befcca218b4a501343e6d05f2c9ff76199a293b301ee92137a822cbc66fb008e63c754e2d0ebdfc8457b80c497463748594244582d8d
data/README.md CHANGED
@@ -53,12 +53,14 @@ distribution among queues any time you want.
53
53
 
54
54
  If you use multiple sidekiq processes then you can specify limits per process:
55
55
 
56
- ```
56
+ ```yaml
57
57
  :process_limits:
58
58
  queue_name: 2
59
59
  ```
60
60
 
61
- Or set it in your code: ```ruby
61
+ Or set it in your code:
62
+
63
+ ```ruby
62
64
  Sidekiq::Queue['queue_name'].process_limit = 2
63
65
  ```
64
66
 
@@ -8,7 +8,8 @@ class Sidekiq::LimitFetch
8
8
 
9
9
  options[:strict] ? strict_order! : weighted_order!
10
10
 
11
- set_limits options[:limits]
11
+ set :limit, options[:limits]
12
+ set :process_limit, options[:process_limits]
12
13
  set_blocks options[:blocking]
13
14
  end
14
15
 
@@ -30,10 +31,10 @@ class Sidekiq::LimitFetch
30
31
  Global::Selector
31
32
  end
32
33
 
33
- def set_limits(limits)
34
+ def set(limit_type, limits)
34
35
  return unless limits
35
36
  limits.each do |name, limit|
36
- Sidekiq::Queue[name].limit = limit
37
+ Sidekiq::Queue[name].send "#{limit_type}=", limit
37
38
  end
38
39
  end
39
40
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'sidekiq-limit_fetch'
3
- gem.version = '2.1.0'
3
+ gem.version = '2.1.1'
4
4
  gem.authors = 'brainopia'
5
5
  gem.email = 'brainopia@evilmartians.com'
6
6
  gem.summary = 'Sidekiq strategy to support queue limits'
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: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - brainopia