fluent-plugin-oceanbase-logs 0.1.1 → 0.1.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 562c1a532751f82c0aef77e9cbb283e074ad46d0252f85220be1c53edb332a00
|
|
4
|
+
data.tar.gz: b5a4b85ac83aa4b7bd980728b1ed2735faeff4d4d71d4b1744c98c92d9ff8521
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6f100568de25bdafb0d8dcab796fd9d29a7a118e4383fee0331c3c110931eec4f0b95a3c10048f7f38024fcc338cdfb78ad0c4273657c57caa82d4ab78462ed
|
|
7
|
+
data.tar.gz: d4954f6b6b2af17fa111f22378f5dcb047f20e9bce6981c65ec8575898ea9c873d42ecc61154a6c116a5813e4c21ce5736c33c95ef2fb074e9ddb7f8f568db61
|
|
@@ -201,12 +201,21 @@ module Fluent::Plugin
|
|
|
201
201
|
end
|
|
202
202
|
|
|
203
203
|
def extract_records(response)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
204
|
+
data = response['data']
|
|
205
|
+
return [] if data.nil?
|
|
206
|
+
|
|
207
|
+
if data.is_a?(Hash)
|
|
208
|
+
list = data['dataList']
|
|
209
|
+
return list if list.is_a?(Array)
|
|
210
|
+
return [] if list.nil? || list == []
|
|
211
|
+
elsif data.is_a?(Array)
|
|
212
|
+
return data
|
|
209
213
|
end
|
|
214
|
+
|
|
215
|
+
log.warn "Unexpected API response structure",
|
|
216
|
+
keys: response.keys, data_class: data.class.name,
|
|
217
|
+
data_keys: (data.respond_to?(:keys) ? data.keys : nil)
|
|
218
|
+
[]
|
|
210
219
|
end
|
|
211
220
|
|
|
212
221
|
# ---- API calls ----
|