gorg_message_sender 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gorg_message_sender.rb +10 -11
- data/lib/gorg_message_sender/version.rb +1 -1
- 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: c2f1aa064a3d4d4e965141ca188503e67a1a347c
|
4
|
+
data.tar.gz: 6c1cc82bdbdd809a4c5bd9416fcd5f1ee17eae62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b81fc9cd1e710a921d1835e777bf2e31e324e8d08c7abb0ab21479df2972c45505547a0c19b4b8b044fa61cc9f3c36fb539dc618513dcfd94788a56e7777ff7
|
7
|
+
data.tar.gz: 8e3e66274945ab4745c3ed2dc5fb0e06ca597cdd81dd5e62e9cc5699c0f95c1a048ace7d6e584eb1de754903eb2b01efe99285d06dc45d88ffd7d3254386853a
|
data/lib/gorg_message_sender.rb
CHANGED
@@ -67,20 +67,19 @@ class GorgMessageSender
|
|
67
67
|
|
68
68
|
protected
|
69
69
|
|
70
|
-
def
|
71
|
-
@
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
@
|
79
|
-
@conn
|
70
|
+
def conn_id
|
71
|
+
"amqp://#{@r_user}:#{@r_pass}@#{@r_host}:#{@r_port}/#{@r_vhost}"
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.conn(url)
|
75
|
+
@conns=Hash.new(nil)
|
76
|
+
@conns[url]||=Bunny.new(url)
|
77
|
+
@conns[url].start unless @conns[url].connected?
|
78
|
+
@conns[url]
|
80
79
|
end
|
81
80
|
|
82
81
|
def ch
|
83
|
-
@_ch = (@_ch && @_ch.status == :open) ? @_ch : conn.create_channel
|
82
|
+
@_ch = (@_ch && @_ch.status == :open) ? @_ch : self.class.conn(conn_id).create_channel
|
84
83
|
end
|
85
84
|
|
86
85
|
def start(opts)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gorg_message_sender
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Narbonne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|