sneakers_packer 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/sneakers_packer/rpc_client.rb +12 -9
- data/lib/sneakers_packer/version.rb +1 -1
- data/sneakers_packer.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6b98083ec7e1c36b50a533f25a6491b18ea1d82
|
4
|
+
data.tar.gz: 96984ee06ee6d2e12700f5a7c74f199b11852766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a599887e7d24b3de1753976db48c13cb622849facf3cd8137b515c3729609652133342fbaa2d55148b25810574972f5ca5a57dd34b5252eebe50b58c003b2778
|
7
|
+
data.tar.gz: 9b6bc6df8d3b9ae5ed76c80b4819b3b213062b39937b619b19ca211ad9b980d092761a245cf406081b53288f544bcc93a5e84ac3c8d193e7c03dad13f5a14f1a
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,7 @@ module SneakersPacker
|
|
8
8
|
def initialize(publisher)
|
9
9
|
@publisher = publisher
|
10
10
|
channel, exchange = fetch_channel_and_exchange
|
11
|
+
@queue_name = "rpc.#{SecureRandom.uuid}"
|
11
12
|
@consumer = build_reply_queue(channel, exchange)
|
12
13
|
end
|
13
14
|
|
@@ -35,7 +36,7 @@ module SneakersPacker
|
|
35
36
|
lock.synchronize { condition.wait(lock, timeout) }
|
36
37
|
|
37
38
|
if response == NO_RESPONSE
|
38
|
-
raise RemoteCallTimeoutError, "
|
39
|
+
raise RemoteCallTimeoutError, "Remote call timeouts.Exceed #{timeout} seconds."
|
39
40
|
else
|
40
41
|
response
|
41
42
|
end
|
@@ -49,13 +50,15 @@ module SneakersPacker
|
|
49
50
|
exchange = nil
|
50
51
|
|
51
52
|
@publisher.instance_eval do
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
if @bunny.nil? || !@bunny.automatically_recover?
|
54
|
+
# ensure_connection connection first
|
55
|
+
@mutex.synchronize do
|
56
|
+
unless connected?
|
57
|
+
ensure_connection!
|
58
|
+
reconnected = true
|
59
|
+
channel = @channel
|
60
|
+
exchange = @exchange
|
61
|
+
end
|
59
62
|
end
|
60
63
|
end
|
61
64
|
end
|
@@ -69,7 +72,7 @@ module SneakersPacker
|
|
69
72
|
def build_reply_queue(channel, exchange)
|
70
73
|
@channel, @exchange = channel, exchange
|
71
74
|
|
72
|
-
@reply_queue = channel.queue(
|
75
|
+
@reply_queue = channel.queue(@queue_name, exclusive: true)
|
73
76
|
@reply_queue.bind(exchange, routing_key: @reply_queue.name)
|
74
77
|
|
75
78
|
@lock = Mutex.new
|
data/sneakers_packer.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "sneakers", "
|
21
|
+
spec.add_dependency "sneakers", ">= 1.0.0"
|
22
22
|
spec.add_dependency "multi_json"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.11"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sneakers_packer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vincent
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sneakers
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|