deimos-ruby 1.23.1.pre.beta3 → 1.23.1.pre.beta4

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: 89259c86278401bf810b90ec9b611cda1e7fd8fc9d35a0bace0c5fe8ffdc58ae
4
- data.tar.gz: eb14298f1b4facd22ef4ce80b0d412dc4b416a49c6c7c3fd82a5517ac4bd1629
3
+ metadata.gz: fcabc5df2ee121cfeb1616d40225130dc55585385b46c38acaf331a048027bb5
4
+ data.tar.gz: 2e531da904466c33a91a949e8155862b3220dc7b0b13e2003846f535f06a9932
5
5
  SHA512:
6
- metadata.gz: 20cb3e0bcfc150c6e1e7905f8514d1e73ac557e3f28fe71c3879dac4a84b349c66b148f6a8a248ecad1f348b474462b0fe038353ce1fbf23340ba1698f6ffd78
7
- data.tar.gz: f539adc543e4eef62d2477e1f4a2342952b9384190b8520460b59077781c5638b344a870d196e90bd689a1de62db0ac03e4d2317865007566f4c4c73591ba509
6
+ metadata.gz: 3df2faa4a5b1d1a52dcd62df7517af969ecbbe40fb6179c2ece9961877a22946327f285827053e1a7f88278fc0a0b9530e1c729219d02a936f144a875b9ba4c2
7
+ data.tar.gz: bd5ce8c1ba81ffbf875d873c2990a7bf22cf6d914e77320f930988bd873dbc8cf871fd8796425505dd118fd8b5d1d47e881b076d2316e1a43aed5486c84d7327
@@ -49,6 +49,7 @@ module Deimos
49
49
  # @return [void]
50
50
  def self.send_produce_error(event)
51
51
  exception = event.payload[:exception_object]
52
+ Rails.logger.info("Exception: #{exception}")
52
53
  return unless exception
53
54
 
54
55
  if exception.respond_to?(:failed_messages)
@@ -85,6 +86,7 @@ module Deimos
85
86
 
86
87
  ActiveSupport::Notifications.subscribe('deliver_messages.producer.kafka') do |*args|
87
88
  event = ActiveSupport::Notifications::Event.new(*args)
89
+ Rails.logger.info(event.payload)
88
90
  KafkaListener.send_produce_error(event)
89
91
  end
90
92
  end
@@ -105,17 +105,6 @@ module Deimos
105
105
  raise Deimos::MissingImplementationError
106
106
  end
107
107
 
108
- # @param span [Object]
109
- # @param e [Exception]
110
- def set_error_and_retry(span, e)
111
- span.set_error(e)
112
- span.finish
113
- Deimos.config.tracer&.start(
114
- 'deimos-db-poller',
115
- resource: @resource_class.name.gsub('::', '-')
116
- )
117
- end
118
-
119
108
  # @param batch [Array<ActiveRecord::Base>]
120
109
  # @param status [PollStatus]
121
110
  # @return [Boolean]
@@ -130,14 +119,12 @@ module Deimos
130
119
  Deimos.config.tracer&.finish(span)
131
120
  status.batches_processed += 1
132
121
  rescue Kafka::Error => e # keep trying till it fixes itself
133
- span = set_error_and_retry(span, e)
134
122
  Deimos.config.logger.error("Error publishing through DB Poller: #{e.message}")
135
123
  sleep(0.5)
136
124
  retry
137
125
  rescue StandardError => e
138
126
  Deimos.config.logger.error("Error publishing through DB poller: #{e.message}}")
139
127
  if @config.retries.nil? || retries < @config.retries
140
- span = set_error_and_retry(span, e)
141
128
  retries += 1
142
129
  sleep(0.5)
143
130
  retry
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '1.23.1-beta3'
4
+ VERSION = '1.23.1-beta4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.1.pre.beta3
4
+ version: 1.23.1.pre.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner