queue-bus 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/queue_bus/application.rb +35 -8
- data/lib/queue_bus/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 329cc0a74e428d99421a14c9b2b07e39e14ee98da5c43babceb51376d27006c6
|
4
|
+
data.tar.gz: 2439e577df8ea33e2f959b49ddfc105858844080556c4431a47897667d87fa92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2875311c4100923fc00886ac05e2b4053ec6bfff442114faa6cc6bf39698916234866f57ebcbeb09dbcaca85484ca3bb0ce88cdbf8eb5640f6ca3b46d88a5a23
|
7
|
+
data.tar.gz: f7d88adffc92f2635b1068f47c68238787b55eea86d4302bc2579a40bc2c3ff4ce145d62688a7584a2b48fa31b03951b993757a0e3b65eb71a1b3a4715aeb741
|
data/CHANGELOG.md
CHANGED
@@ -7,7 +7,22 @@ module QueueBus
|
|
7
7
|
class << self
|
8
8
|
def all
|
9
9
|
# note the names arent the same as we started with
|
10
|
-
::QueueBus.redis
|
10
|
+
::QueueBus.redis do |redis|
|
11
|
+
app_keys = redis.smembers(app_list_key)
|
12
|
+
apps = app_keys.collect { |val| new(val) }
|
13
|
+
|
14
|
+
hashes = redis.pipelined do
|
15
|
+
apps.each do |app|
|
16
|
+
redis.hgetall(app.redis_key)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
apps.zip(hashes).each do |app, hash|
|
21
|
+
app._hydrate_redis_hash(hash)
|
22
|
+
end
|
23
|
+
|
24
|
+
apps
|
25
|
+
end
|
11
26
|
end
|
12
27
|
end
|
13
28
|
|
@@ -90,6 +105,10 @@ module QueueBus
|
|
90
105
|
out
|
91
106
|
end
|
92
107
|
|
108
|
+
def _hydrate_redis_hash(hash)
|
109
|
+
@raw_redis_hash = hash
|
110
|
+
end
|
111
|
+
|
93
112
|
protected
|
94
113
|
|
95
114
|
def self.normalize(val)
|
@@ -114,16 +133,24 @@ module QueueBus
|
|
114
133
|
|
115
134
|
def read_redis_hash
|
116
135
|
out = {}
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
out[key] = val
|
123
|
-
end
|
136
|
+
raw_redis_hash.each do |key, val|
|
137
|
+
begin
|
138
|
+
out[key] = ::QueueBus::Util.decode(val)
|
139
|
+
rescue ::QueueBus::Util::DecodeException
|
140
|
+
out[key] = val
|
124
141
|
end
|
125
142
|
end
|
126
143
|
out
|
127
144
|
end
|
145
|
+
|
146
|
+
private
|
147
|
+
|
148
|
+
def raw_redis_hash
|
149
|
+
return @raw_redis_hash if @raw_redis_hash
|
150
|
+
|
151
|
+
::QueueBus.redis do |redis|
|
152
|
+
redis.hgetall(redis_key)
|
153
|
+
end
|
154
|
+
end
|
128
155
|
end
|
129
156
|
end
|
data/lib/queue_bus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue-bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Leonard
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -159,7 +159,7 @@ files:
|
|
159
159
|
homepage: ''
|
160
160
|
licenses: []
|
161
161
|
metadata: {}
|
162
|
-
post_install_message:
|
162
|
+
post_install_message:
|
163
163
|
rdoc_options: []
|
164
164
|
require_paths:
|
165
165
|
- lib
|
@@ -174,9 +174,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
- !ruby/object:Gem::Version
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
|
-
|
178
|
-
|
179
|
-
signing_key:
|
177
|
+
rubygems_version: 3.0.3
|
178
|
+
signing_key:
|
180
179
|
specification_version: 4
|
181
180
|
summary: A simple event bus on top of background queues
|
182
181
|
test_files:
|