sidekiq-limit_fetch 1.3 → 1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45106fd76c4d8e0bb1621e904f0826b08450ac42
|
4
|
+
data.tar.gz: 776c116e27e48b3262a7a201f9fd7e3843c800e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19b51939f0560f367ee1ccb167c0b251f3dc6af1abd0cf4cac9f76eb760c098c8a479e99ddc1cdb3d068f4c3267ccdad49174505cb2e49fb82b59ede7a0eba36
|
7
|
+
data.tar.gz: f975a401b537405c83c597490b42cf37d46f9ee5c433744accb5dd28ea6b27d5c377f85fe6518117118eaf93adfe9f318713faae16c56117ada55be3f5cfede2
|
@@ -19,7 +19,9 @@ class Sidekiq::LimitFetch
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def release_except(full_name)
|
22
|
-
|
22
|
+
queues = restore
|
23
|
+
queues.delete full_name[/queue:(.*)/, 1] if full_name
|
24
|
+
@selector.release queues
|
23
25
|
end
|
24
26
|
|
25
27
|
private
|
data/sidekiq-limit_fetch.gemspec
CHANGED
@@ -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) {
|
6
|
+
let(:ttl) { 1 }
|
7
7
|
let(:queue) { Sidekiq::Queue[name] }
|
8
8
|
let(:name) { 'default' }
|
9
9
|
|
@@ -16,14 +16,15 @@ describe Sidekiq::LimitFetch::Global::Monitor do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
context 'old locks' do
|
19
|
-
let(:timeout) {
|
19
|
+
let(:timeout) { 0.5 }
|
20
20
|
|
21
21
|
it 'should remove invalidated old locks' do
|
22
22
|
2.times { queue.acquire }
|
23
|
-
|
23
|
+
sleep 2*ttl
|
24
24
|
queue.busy.should == 2
|
25
|
-
|
26
|
-
described_class.
|
25
|
+
|
26
|
+
described_class.stub :update_heartbeat
|
27
|
+
sleep 2*ttl
|
27
28
|
queue.busy.should == 0
|
28
29
|
end
|
29
30
|
end
|