gamma_replication 0.1.2 → 0.1.3
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: 6fcf79da2a605e4984ba168b86117cc087f4da9414fc3075949ec3de0e4150e0
|
4
|
+
data.tar.gz: 369e57afcf359c2f148a0a3c985641ccf5beaa3706aade4c48e210827d5c04ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c669c00890ad60fdfe242ad8e472f4f7b63154e4755d22bd798223c47536384f94f51dc8ae6bb2cd8aef83c386f5ac3f72906dcb4b4cccb709beb5282df9a2fa
|
7
|
+
data.tar.gz: f7ff79e999e05d3dabe4e5bd73fc9c0d8bf1939d0faef44391ba212eb5c8516809e65c50c5ee972e044cb6b7d68805c172ad18924f01b53644e2146a68a761ce
|
@@ -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
|