airbrake 13.0.3 → 13.0.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: 29da4f7ace6d408a64f855ddab6385fd40863235694a22cd31f5e46d1ae9c957
4
- data.tar.gz: 4c08d2305072b5b48936e87dd2e53bf1610459637c7e23c7e75e118e475232b9
3
+ metadata.gz: 4f91f4d04951002ed983c872b4d6042c1cc4c01ae609d3969b4b7e9b344bdf12
4
+ data.tar.gz: 58ee6fd62567a65f7df5178f6d0d9e6bd9cd58e9debbf62d9d75fa741b20b6d3
5
5
  SHA512:
6
- metadata.gz: 9ddb0e206f5723439061ca14af99f2c228f80f6db5907f07a16a8fde611b4f1e13533a0dea5e5b27d564a90e3044fb449fa09731274042c59fbb84bdb7f83af1
7
- data.tar.gz: b78091a0e4391c27eea3c884130e1c6515cf10cf417ea29ec6c6df32075f5917dead2efd2f6e42395a64142f761d3870408ba5f7c7fb3ed1a90f53204c7bc8b2
6
+ metadata.gz: 6b464a25e936fafa269f35bb5c19ed6134ba65f4184f9d76e5f5a349370e1277dc71418393c21a8427dcecc572aabaa941a5ae41dbbfa1547fa280d1416fc630
7
+ data.tar.gz: a78fdeaba2521c51e47b4f9bbee5674b1d3228e25345e7d20cac5c3186c856c6c860a5daee82adc32f8001bce3b6422be50c31dbba32912f43dd535ba1dc965b
@@ -6,17 +6,20 @@ module Airbrake
6
6
  # by Sidekiq
7
7
  # @since v7.3.0
8
8
  class RetryableJobsFilter
9
- if Gem::Version.new(::Sidekiq::VERSION) < Gem::Version.new('5.0.0')
9
+ SIDEKIQ_GTE_5_0_0 = Gem::Version.new(::Sidekiq::VERSION) >= Gem::Version.new('5.0.0')
10
+ SIDEKIQ_GTE_7_0_0 = Gem::Version.new(::Sidekiq::VERSION) >= Gem::Version.new('7.0.0')
11
+
12
+ if SIDEKIQ_GTE_5_0_0
13
+ require 'sidekiq/job_retry'
14
+ DEFAULT_MAX_RETRY_ATTEMPTS = ::Sidekiq::JobRetry::DEFAULT_MAX_RETRY_ATTEMPTS
15
+ else
10
16
  require 'sidekiq/middleware/server/retry_jobs'
11
17
  DEFAULT_MAX_RETRY_ATTEMPTS = \
12
18
  ::Sidekiq::Middleware::Server::RetryJobs::DEFAULT_MAX_RETRY_ATTEMPTS
13
- else
14
- require 'sidekiq/job_retry'
15
- DEFAULT_MAX_RETRY_ATTEMPTS = ::Sidekiq::JobRetry::DEFAULT_MAX_RETRY_ATTEMPTS
16
19
  end
17
20
 
18
21
  def initialize(max_retries: nil)
19
- @max_retries = max_retries
22
+ @retries_before_notify = max_retries
20
23
  end
21
24
 
22
25
  def call(notice)
@@ -36,8 +39,8 @@ module Airbrake
36
39
  end
37
40
 
38
41
  def max_attempts_for(job)
39
- if @max_retries
40
- @max_retries
42
+ if @retries_before_notify
43
+ @retries_before_notify
41
44
  elsif job['retry'].is_a?(Integer)
42
45
  job['retry']
43
46
  else
@@ -46,7 +49,10 @@ module Airbrake
46
49
  end
47
50
 
48
51
  def max_retries
49
- @max_retries ||= ::Sidekiq.options[:max_retries] || DEFAULT_MAX_RETRY_ATTEMPTS
52
+ @max_retries ||= begin
53
+ config = SIDEKIQ_GTE_7_0_0 ? ::Sidekiq.default_configuration : ::Sidekiq.options
54
+ config[:max_retries] || DEFAULT_MAX_RETRY_ATTEMPTS
55
+ end
50
56
  end
51
57
  end
52
58
  end
@@ -3,5 +3,5 @@
3
3
  # We use Semantic Versioning v2.0.0
4
4
  # More information: http://semver.org/
5
5
  module Airbrake
6
- AIRBRAKE_VERSION = '13.0.3'
6
+ AIRBRAKE_VERSION = '13.0.4'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.0.3
4
+ version: 13.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airbrake Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-20 00:00:00.000000000 Z
11
+ date: 2023-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake-ruby
@@ -349,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
349
  - !ruby/object:Gem::Version
350
350
  version: '0'
351
351
  requirements: []
352
- rubygems_version: 3.3.3
352
+ rubygems_version: 3.3.26
353
353
  signing_key:
354
354
  specification_version: 4
355
355
  summary: Airbrake is an online tool that provides robust exception tracking in any