phobos 2.1.2 → 2.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: 687b8d954c8b21b656aaf41d7d4112d3e100d8845de0bd85436d38ebec4f6934
4
- data.tar.gz: 8ed5b722c0b45e936092a6baab59302ba227fca3a243c24d97913050d3f18e71
3
+ metadata.gz: '0956b5ef7d6d1cdd48c4f8fd36a8236d192450eda009f5313ec81d628784ce0b'
4
+ data.tar.gz: 17e608663beea493f386290bb8781f5c540baee9ba00e0fde47fce2504ee9f7d
5
5
  SHA512:
6
- metadata.gz: a12aa12ad91cdc2a681eea54c5a1db0f8d55cd16c79d7c02c0dc97f58152c1a7111e54455a66e8dda6eb38eee752894d2a74bad29f05b07b52fb9bf6ffda33f9
7
- data.tar.gz: da1cb8365cb7504783db26b456de81611d69cd3c943840efef8af5a5688b301c8c736017b3991e6e8fd0feff290c33749d6d0b7ea37913093b28bc6aa7a964cf
6
+ metadata.gz: 7df8dbd47d916c8d344badce4039598188c5ce53b3d595c9baa5e6d0fa5467482ca5ebdeddb972fcf9aded6f4ac8905add780bc8104b6d7cccdbb71d21c86c23
7
+ data.tar.gz: 6db4a6e57804d373eb055b6ab88cd709b8260e141a5853f4826f927c50912d2224f206c9751bd5186f87bf99aa3463ff3df6e65a536a17ec7f7aee58cffe89a5
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
  ``
7
7
  ## UNRELEASED
8
8
 
9
+ ## [2.1.3] - 2022-05-13
10
+
11
+ - Rescue and log Kafka::HeartbeatError in batch processing
12
+
9
13
  ## [2.1.2] - 2022-01-27
10
14
 
11
15
  - Fix packaging error.
@@ -4,6 +4,7 @@ module Phobos
4
4
  module Actions
5
5
  class ProcessBatch
6
6
  include Phobos::Instrumentation
7
+ include Phobos::Log
7
8
 
8
9
  attr_reader :metadata
9
10
 
@@ -26,7 +27,11 @@ module Phobos
26
27
  message: message,
27
28
  listener_metadata: @listener_metadata
28
29
  ).execute
29
- @listener.consumer.trigger_heartbeat
30
+ begin
31
+ @listener.consumer.trigger_heartbeat
32
+ rescue Kafka::HeartbeatError => e
33
+ log_warn("Error sending Heartbeat #{e.class.name}-#{e}")
34
+ end
30
35
  end
31
36
  end
32
37
  end
data/lib/phobos/log.rb CHANGED
@@ -13,6 +13,10 @@ module Phobos
13
13
  def log_error(msg, metadata)
14
14
  LoggerHelper.log(:error, msg, metadata)
15
15
  end
16
+
17
+ def log_warn(msg, metadata = {})
18
+ LoggerHelper.log(:warn, msg, metadata)
19
+ end
16
20
  end
17
21
 
18
22
  module LoggerHelper
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Phobos
4
- VERSION = '2.1.2'
4
+ VERSION = '2.1.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phobos
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Túlio Ornelas
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2022-01-27 00:00:00.000000000 Z
18
+ date: 2022-05-13 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bundler
@@ -315,7 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
315
  - !ruby/object:Gem::Version
316
316
  version: '0'
317
317
  requirements: []
318
- rubygems_version: 3.2.22
318
+ rubygems_version: 3.3.5
319
319
  signing_key:
320
320
  specification_version: 4
321
321
  summary: Simplifying Kafka for ruby apps