smart-que 0.2.3 → 0.2.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/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/lib/smart_que/consumers/base.rb +5 -1
- data/lib/smart_que/publishers/base.rb +4 -9
- data/lib/smart_que/version.rb +1 -1
- data/lib/smart_que.rb +5 -0
- 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: d1bd51aadd5975296cea9f91b4dc5a2ee8eabf41
|
|
4
|
+
data.tar.gz: b3129e1bd3c29c76b0de0d3f21477584541a61b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec96c1915582d8217de71c79326c4b2f2336711bfa59e7e4ae67772eb1d83ee6bd31ae200f58f2063b233d9b02beb390d195a88df1ea838218fdbabbc5b9b9ad
|
|
7
|
+
data.tar.gz: 12556476f004eb37ed2e23d39c4f2a8a134cae9497809357e94a3acac45e0fc249e0d5744fd32881069efb10cd51b65298360ee0e4c3588f20cf52411b5c686d
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
smart-que (0.2.
|
|
4
|
+
smart-que (0.2.4)
|
|
5
5
|
bunny (~> 2.11)
|
|
6
6
|
connection_pool (~> 2.2)
|
|
7
7
|
|
|
@@ -59,7 +59,7 @@ PLATFORMS
|
|
|
59
59
|
DEPENDENCIES
|
|
60
60
|
bundler (~> 1.16)
|
|
61
61
|
bunny (~> 2.11.0)
|
|
62
|
-
connection_pool (~> 2.2.
|
|
62
|
+
connection_pool (~> 2.2.2)
|
|
63
63
|
guard
|
|
64
64
|
guard-minitest
|
|
65
65
|
minitest (~> 5.11)
|
|
@@ -25,7 +25,11 @@ module Consumers
|
|
|
25
25
|
|
|
26
26
|
# Create channel with the established connection.
|
|
27
27
|
def channel
|
|
28
|
-
|
|
28
|
+
# Create new channel if closed
|
|
29
|
+
if @channel.nil? || @channel.closed?
|
|
30
|
+
@channel = connection.create_channel
|
|
31
|
+
end
|
|
32
|
+
@channel
|
|
29
33
|
end
|
|
30
34
|
|
|
31
35
|
def config
|
|
@@ -8,17 +8,12 @@ module SmartQue
|
|
|
8
8
|
::SmartQue.config.queues
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
# Methods related to bunny exchange, channels, queues
|
|
12
|
-
def channel_pool
|
|
13
|
-
@channel_pool ||= ConnectionPool.new do
|
|
14
|
-
connection.create_channel
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
11
|
def channel
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
# Create new channel if closed
|
|
13
|
+
if @channel.nil? || @channel.closed?
|
|
14
|
+
@channel = connection.create_channel
|
|
21
15
|
end
|
|
16
|
+
@channel
|
|
22
17
|
end
|
|
23
18
|
|
|
24
19
|
# Direct exchange
|
data/lib/smart_que/version.rb
CHANGED
data/lib/smart_que.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart-que
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ashik Salman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-08-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bunny
|