record_store 3.1.1 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/record_store/version.rb +1 -1
- data/lib/record_store/zone.rb +17 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 018df2d25b2395d0231937cc99f694bd53fd9e82
|
4
|
+
data.tar.gz: b9a42133108fadc3d16fe2ce9a55482acaf96089
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd6a4cae2e1a8b1db0019cb656b00f2e0eb56007e3ba3107c428e96ea865a1ad391d5d24808d066eb1490cad261a3a02e2c2f20b466284a2a19673326b3bd7d
|
7
|
+
data.tar.gz: 2605aa2f439c4c97012138830033c35d9e5dc274d8f9161b3ff6bb999d99b69f9382fcb595a194597e502e4de27353a9831e77065bc9783c8d9b49b040de6643
|
data/lib/record_store/version.rb
CHANGED
data/lib/record_store/zone.rb
CHANGED
@@ -41,11 +41,23 @@ module RecordStore
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
self.all
|
47
|
-
|
48
|
-
|
44
|
+
MAX_PARALLEL_THREADS = 10
|
45
|
+
def modified(verbose: false)
|
46
|
+
modified_zones, mutex, zones = [], Mutex.new, self.all
|
47
|
+
|
48
|
+
(1..MAX_PARALLEL_THREADS).map do
|
49
|
+
Thread.new do
|
50
|
+
current_zone = nil
|
51
|
+
while not zones.empty?
|
52
|
+
mutex.synchronize { current_zone = zones.shift }
|
53
|
+
begin
|
54
|
+
mutex.synchronize { modified_zones << current_zone } unless current_zone.unchanged?
|
55
|
+
rescue Excon::Error::BadRequest => e
|
56
|
+
raise e unless e.response.body.include?('session already has a job')
|
57
|
+
puts "DynECT session collision for #{current_zone.name}" if verbose
|
58
|
+
mutex.synchronize { zones.push(current_zone) }
|
59
|
+
end
|
60
|
+
end
|
49
61
|
end
|
50
62
|
end.each(&:join)
|
51
63
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: record_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willem van Bergen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-10-
|
12
|
+
date: 2016-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|