multiwoven-integrations 0.7.3 → 0.7.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: 693440a73b76750eaccde5f6f31740a7545330d279bc429c837f9f7fb818f8bc
4
- data.tar.gz: 6ad84800b7397a69c2b4db6698044379b0514840776a893ebbe996e62b8b7f4e
3
+ metadata.gz: 37b545ee313b4f088f5978fc8332e12506b2c964919a4a1a6599c7549c968ba0
4
+ data.tar.gz: b8a089e677f9726a7ef2b432a6b6334a5e40e96b3190c216a133b6eef5cb6a09
5
5
  SHA512:
6
- metadata.gz: d57f467335ccd3685a58c13662e741c87408d11ca1043258d63e2ee76ee69794491e43fce2b42bd2ba15947974aa8ac40a2c734db51efe2ed328722d8e674b4b
7
- data.tar.gz: 5b520ab5ff9f6168ac9cbfa750ee1a1bb02063f84ac7044ed9eb95611b13659b674ae02aece579e30921a3439efb1789a5f98f548ce65e74b030111264ead7e8
6
+ metadata.gz: 8e1563c35fdf1db6451ce8c53231a2b7aba4a1eaf050d264817e3c4d63be2c46c30691b7b08007c74af76a4d91b01bcd256b370f4c2fefe6e23e617adf8e1f85
7
+ data.tar.gz: 9fbe9e662993a134224d1ee03aff8ec6124ce7f59cc545b4beb3efba98407bfa42a19a846b4ebdb8d0c9a80ef4e9a58e82a4cc20219cc959a19ff3f16a98f926
@@ -57,11 +57,13 @@ module Multiwoven
57
57
  end
58
58
 
59
59
  def process_records(records, stream)
60
+ log_message_array = []
60
61
  write_success = 0
61
62
  write_failure = 0
62
63
  records.each do |record_object|
63
- process_record(stream, record_object.with_indifferent_access)
64
+ request, response = *process_record(stream, record_object.with_indifferent_access)
64
65
  write_success += 1
66
+ log_message_array << log_request_response("info", request, response)
65
67
  rescue StandardError => e
66
68
  write_failure += 1
67
69
  handle_exception(e, {
@@ -70,8 +72,9 @@ module Multiwoven
70
72
  sync_id: @sync_config.sync_id,
71
73
  sync_run_id: @sync_config.sync_run_id
72
74
  })
75
+ log_message_array << log_request_response("error", request, e.message)
73
76
  end
74
- tracking_message(write_success, write_failure)
77
+ tracking_message(write_success, write_failure, log_message_array)
75
78
  end
76
79
 
77
80
  def process_record(stream, record)
@@ -80,7 +83,8 @@ module Multiwoven
80
83
 
81
84
  def send_data_to_slack(stream_name, record = {})
82
85
  args = build_args(stream_name, record)
83
- @client.send(stream_name, **args)
86
+ response = @client.send(stream_name, **args)
87
+ [args, response]
84
88
  end
85
89
 
86
90
  def build_args(stream_name, record)
@@ -114,12 +118,6 @@ module Multiwoven
114
118
  def load_catalog
115
119
  read_json(CATALOG_SPEC_PATH)
116
120
  end
117
-
118
- def tracking_message(success, failure)
119
- Multiwoven::Integrations::Protocol::TrackingMessage.new(
120
- success: success, failed: failure
121
- ).to_multiwoven_message
122
- end
123
121
  end
124
122
  end
125
123
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.7.3"
5
+ VERSION = "0.7.4"
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.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subin T P