Module: ThreeScale::Backend::Logging::External::Resque

Defined in:
lib/3scale/backend/logging/external/resque.rb

Class Method Summary collapse

Class Method Details

.setup(klass) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/3scale/backend/logging/external/resque.rb', line 14

def setup(klass)
  load_resque_failure_for klass

  ::Resque::Failure::Multiple.classes = [
    ::Resque::Failure::Redis,
    Class.new(::Resque::Failure::Airbrake) do
      def self.configure(&block)
        # calling this hook is an error
        raise "error: tried to configure #{self.inspect} from Resque"
      end
    end,
  ]
  ::Resque::Failure.backend = ::Resque::Failure::Multiple
end