gamma_replication 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3663201d44383fe14f66bd716f1276cdd7920eb14aeaf588621ed874ab433aa
|
4
|
+
data.tar.gz: 437a7d18d43c2edc61f4a05759db7fa4fa206292e66d68ed6b917f097d296123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7d2d575ad7cf93c0c625728eaaa4fe9a5002148395d772c3d3d89078b837f72ca0b78205fb371164e0da13b9ce2088e218103da337fd0a98900943f456712a1
|
7
|
+
data.tar.gz: 77c2eb5eebabbd7436c48f9fada27d0d129bd7056779a5121a82f5456eeee65b79e9b4fb879b7a2baa0423559f55efa71c405836814baccca75e742c137881b5
|
@@ -100,7 +100,8 @@ module GammaReplication
|
|
100
100
|
|
101
101
|
process_data_by_type(data)
|
102
102
|
rescue StandardError => e
|
103
|
-
|
103
|
+
error_message = e.message.to_s.split("\n").first
|
104
|
+
logger.error("Error: #{error_message.gsub(/\s+/, " ")}")
|
104
105
|
end
|
105
106
|
|
106
107
|
def should_process_data?(data)
|
@@ -132,7 +133,8 @@ module GammaReplication
|
|
132
133
|
process_delete(table_setting, data)
|
133
134
|
end
|
134
135
|
rescue StandardError => e
|
135
|
-
|
136
|
+
error_message = e.message.to_s.split("\n").first
|
137
|
+
logger.error("Error processing #{data["type"]} for table #{data["table"]}: #{error_message.gsub(/\s+/, " ")}")
|
136
138
|
end
|
137
139
|
|
138
140
|
def process_insert(table_setting, data)
|
@@ -19,8 +19,9 @@ module GammaReplication
|
|
19
19
|
io.each do |line|
|
20
20
|
data = JSON.parse(line.strip)
|
21
21
|
block.call(data) if block_given?
|
22
|
-
rescue JSON::ParserError
|
23
|
-
|
22
|
+
rescue JSON::ParserError
|
23
|
+
# Ignore Maxwell's non-JSON output (startup messages, etc)
|
24
|
+
next
|
24
25
|
end
|
25
26
|
end
|
26
27
|
end
|