sidekiq_middlewares 0.2.0 → 0.3.0

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
  SHA1:
3
- metadata.gz: 5ce493c5d4b804657ed9b78b09bc19c796f29991
4
- data.tar.gz: f67f58242c92f348aed2517783634c06130fcde0
3
+ metadata.gz: 1af97e8dd2479218ef77a849fb2f4952fdcc44f1
4
+ data.tar.gz: 62e9c7c0888bc47a4db507175ad677c9c21923c4
5
5
  SHA512:
6
- metadata.gz: c672f9bf8978c7867d08f228011023383a7769f95014a1718210f64b6ce735618531d1fa9768fea6453b0fdedd31faac3e0a1c24ab0616e8055090ed2d1731e1
7
- data.tar.gz: 12da02767215af852fe6c297c5d66f0701f6a08ad08cbcac8a34c3fcea78578a58aad40a720072f959a1d0b790a2a4da0bac9c5b4a2a53f2844d0e9d9cefafc8
6
+ metadata.gz: 47643629b52194c5692989f95f83efe4465d12360d239bffbd0946734e5af11db733f49125c884bc559f23961635fdaef2b7101314fd792618170be2ed9e44ff
7
+ data.tar.gz: 59f8b9e2b56dc03c8d0cb1818015ececd4ac085e5eff7baa49c04a210f6d51a9869431ca7a642641663ec1704482246e4634010c7b0c0fac41f2d5748ab25d03
@@ -2,5 +2,6 @@ require "sidekiq_middlewares/version"
2
2
 
3
3
  module SidekiqMiddlewares
4
4
  autoload :Benchmarker, "sidekiq_middlewares/benchmarker"
5
+ autoload :ErrorLogger, "sidekiq_middlewares/error_logger"
5
6
  autoload :MdcCleaner, "sidekiq_middlewares/mdc_cleaner"
6
7
  end
@@ -0,0 +1,16 @@
1
+ module SidekiqMiddlewares
2
+ class ErrorLogger
3
+ def initialize(logger)
4
+ @logger = logger
5
+ end
6
+
7
+ def call(*_args)
8
+ begin
9
+ yield
10
+ rescue => ex
11
+ @logger.error ex
12
+ raise
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module SidekiqMiddlewares
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_middlewares
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emarsys Smart Insight Team
@@ -70,6 +70,7 @@ files:
70
70
  - bin/setup
71
71
  - lib/sidekiq_middlewares.rb
72
72
  - lib/sidekiq_middlewares/benchmarker.rb
73
+ - lib/sidekiq_middlewares/error_logger.rb
73
74
  - lib/sidekiq_middlewares/mdc_cleaner.rb
74
75
  - lib/sidekiq_middlewares/version.rb
75
76
  - sidekiq_middlewares.gemspec