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: 5064957ae11ed9958ef813d12fb45ff06bd36f77bcb0b06409664d8564c780cb
4
- data.tar.gz: 577dc47d95729aa81e3f98994945fb1715f9da72b4437bdaa523ce8914cde4ac
3
+ metadata.gz: 055227f9ec70d01b066063ca9d806514eb0cad47344a60e303b7a5bef9d0056d
4
+ data.tar.gz: 54317d770824c8870ccb58f7b2f852731b8df591cf53fc22ebe80d1b4b1a886e
5
5
  SHA512:
6
- metadata.gz: 04ae67e7a763b3e951efea585b4ef96b7226219acb0bd0fdfa2afa057838a847d4617463036b866e95e830862eb440bf43e18210bb62dcc5b4340952802b8234
7
- data.tar.gz: f36f8cbc8b4b9e52c140b8da44e5ac76c5eed33c621268cd5407d0d7c4869902ae10fe4c0047020d1496d8643bcb95452b9376cbff76f79ab2db0bf6da8a2e9a
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
- tracker = Multiwoven::Integrations::Protocol::TrackingMessage.new(
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, {
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.7.8"
5
+ VERSION = "0.7.9"
6
6
 
7
7
  ENABLED_SOURCES = %w[
8
8
  Snowflake
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiwoven-integrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.8
4
+ version: 0.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subin T P