totoro 0.5.5 → 0.5.6
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/lib/totoro/base_queue.rb +3 -2
- data/lib/totoro/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06cc7b035a3ecd62f92957a843d8244e54abde7fea0617ebfd06eb188b40cc93
|
|
4
|
+
data.tar.gz: babf4e1674abb80007c6606d740e9cc73927f9af144cef58aa54d9a807974b6e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2c4d5de1d3488fa19a4a33970d59bd1838d3c90c4a4beff5c49ae752a2b01ca6a85d7e6fd1d4951ff208f59db84bf6a8664cde676478b2034ec5138ab047666
|
|
7
|
+
data.tar.gz: 4b14822ae85f5a358655ac80da45cdc308ec09e952ca12185d7388d799eca383ef3d92d91ca1a821ce7f9a609ec6618dac6d97322f3105ad063c62282f031721
|
data/lib/totoro/base_queue.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Totoro
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def connection
|
|
13
|
-
@connection ||= Bunny.new(config.connect).tap(&:start)
|
|
13
|
+
@connection ||= Bunny.new(config.connect.merge(threaded: false)).tap(&:start)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def channel
|
|
@@ -35,7 +35,8 @@ module Totoro
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def subscribe(id)
|
|
38
|
-
|
|
38
|
+
subscribe_channel = Bunny.new(config.connect).tap(&:start).create_channel
|
|
39
|
+
queue = subscribe_channel.queue(*config.queue(id))
|
|
39
40
|
queue.subscribe do |delivery_info, metadata, payload|
|
|
40
41
|
yield(delivery_info, metadata, payload)
|
|
41
42
|
end
|
data/lib/totoro/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: totoro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ShuHui18
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-11-
|
|
11
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bunny
|