File: configuration.rb

package info (click to toggle)
ruby-sentry-sidekiq 5.18.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 152 kB
  • sloc: ruby: 324; makefile: 10; sh: 4
file content (24 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module Sentry
  class Configuration
    attr_reader :sidekiq

    add_post_initialization_callback do
      @sidekiq = Sentry::Sidekiq::Configuration.new
      @excluded_exceptions = @excluded_exceptions.concat(Sentry::Sidekiq::IGNORE_DEFAULT)
    end
  end

  module Sidekiq
    IGNORE_DEFAULT = ["Sidekiq::JobRetry::Skip"]

    class Configuration
      # Set this option to true if you want Sentry to only capture the last job
      # retry if it fails.
      attr_accessor :report_after_job_retries

      def initialize
        @report_after_job_retries = false
      end
    end
  end
end