multiwoven-integrations 0.7.8 → 0.7.9
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: 055227f9ec70d01b066063ca9d806514eb0cad47344a60e303b7a5bef9d0056d
|
4
|
+
data.tar.gz: 54317d770824c8870ccb58f7b2f852731b8df591cf53fc22ebe80d1b4b1a886e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4dea4975ecc8802be486334961579e680aab99a08ce96a330c4cd6aa14925c1d79e8140bffce057ff3dec8bcc1440f4eca1305dcf389694ea984d2e84fb2de8
|
7
|
+
data.tar.gz: eb235f292d326f59c8d9b35e11076eb32baaaa3b02c40a3cf7db570b50eba15159e12c97b8ff65f1f24bfd5f9b47fadf2f67762c305f5b379a0e8dc97759d918
|
@@ -38,6 +38,7 @@ module Multiwoven::Integrations::Destination
|
|
38
38
|
|
39
39
|
request_method = sync_config.stream.request_method
|
40
40
|
|
41
|
+
log_message_array = []
|
41
42
|
write_success = 0
|
42
43
|
write_failure = 0
|
43
44
|
records.each do |record|
|
@@ -45,6 +46,7 @@ module Multiwoven::Integrations::Destination
|
|
45
46
|
# Add hardcode values into payload
|
46
47
|
record["data"] ||= {}
|
47
48
|
record["data"]["type"] = sync_config.stream.name
|
49
|
+
args = [request_method, url, record]
|
48
50
|
|
49
51
|
response = Multiwoven::Integrations::Core::HttpClient.request(
|
50
52
|
url,
|
@@ -57,6 +59,7 @@ module Multiwoven::Integrations::Destination
|
|
57
59
|
else
|
58
60
|
write_failure += 1
|
59
61
|
end
|
62
|
+
log_message_array << log_request_response("info", args, response)
|
60
63
|
rescue StandardError => e
|
61
64
|
handle_exception(e, {
|
62
65
|
context: "KLAVIYO:RECORD:WRITE:FAILURE",
|
@@ -65,12 +68,9 @@ module Multiwoven::Integrations::Destination
|
|
65
68
|
sync_run_id: sync_config.sync_run_id
|
66
69
|
})
|
67
70
|
write_failure += 1
|
71
|
+
log_message_array << log_request_response("error", args, e.message)
|
68
72
|
end
|
69
|
-
|
70
|
-
success: write_success,
|
71
|
-
failed: write_failure
|
72
|
-
)
|
73
|
-
tracker.to_multiwoven_message
|
73
|
+
tracking_message(write_success, write_failure, log_message_array)
|
74
74
|
rescue StandardError => e
|
75
75
|
# TODO: Handle rate limiting seperately
|
76
76
|
handle_exception(e, {
|