kazoo-ruby 0.3.2 → 0.3.3
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/kazoo/topic.rb +4 -3
- data/lib/kazoo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44f657aaddbff498e1ff0adbbcd6ffec42055e49
|
|
4
|
+
data.tar.gz: 93b6ccb5d116395408e3296e0b481abd09cb3819
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 837a4c49281b748f0e2bc5e58c1e5f1ccc06c45c5185f49c700294e8fcb3c538f9353a2f35bc7ad23e84d1a700e0a655129a5cbeb59a512942f19a1371505d13
|
|
7
|
+
data.tar.gz: dca5c6d3f0ff56a94f0d79d548658659032209e3ad23fa66fbef1f3aa87926cb53552fcc0f854cfb0df3aab3515aacb434a45919df0e66fe4f9af90b2cf9315f
|
data/lib/kazoo/topic.rb
CHANGED
|
@@ -144,9 +144,9 @@ module Kazoo
|
|
|
144
144
|
when Zookeeper::Constants::ZOK
|
|
145
145
|
# continue
|
|
146
146
|
when Zookeeper::Constants::ZNONODE
|
|
147
|
-
|
|
147
|
+
return {}
|
|
148
148
|
else
|
|
149
|
-
raise Kazoo::Error, "Failed to
|
|
149
|
+
raise Kazoo::Error, "Failed to retrieve topic config"
|
|
150
150
|
end
|
|
151
151
|
|
|
152
152
|
config = JSON.parse(result.fetch(:data))
|
|
@@ -183,7 +183,8 @@ module Kazoo
|
|
|
183
183
|
when Zookeeper::Constants::ZOK
|
|
184
184
|
# continue
|
|
185
185
|
when Zookeeper::Constants::ZNONODE
|
|
186
|
-
|
|
186
|
+
result = cluster.zk.create(path: "/config/topics/#{name}", data: config_json)
|
|
187
|
+
raise Kazoo::Error, "Failed to set topic config" unless result.fetch(:rc) == Zookeeper::Constants::ZOK
|
|
187
188
|
else
|
|
188
189
|
raise Kazoo::Error, "Failed to set topic config"
|
|
189
190
|
end
|
data/lib/kazoo/version.rb
CHANGED