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 +4 -4
- data/README.md +4 -2
- data/lib/sidekiq/limit_fetch/queues.rb +4 -3
- data/sidekiq-limit_fetch.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37b25405100cca644241eb4c1106e31020ceaa71
|
4
|
+
data.tar.gz: c6e906b7f2d5553807fcf36082116f5fe7c06824
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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
|
-
|
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
|
34
|
+
def set(limit_type, limits)
|
34
35
|
return unless limits
|
35
36
|
limits.each do |name, limit|
|
36
|
-
Sidekiq::Queue[name].
|
37
|
+
Sidekiq::Queue[name].send "#{limit_type}=", limit
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
data/sidekiq-limit_fetch.gemspec
CHANGED