Sha256: b4ce6d2563cc7c37a9765eae63d292ecac5f63b10149887f537671acaadb490a

Contents?: true

Size: 543 Bytes

Versions: 1

Compression:

Stored size: 543 Bytes

Contents

require 'sidekiq/circuit_breaker/configuration'

module Sidekiq
  module CircuitBreaker
    module Worker
      def self.included(base)
        base.extend(ClassMethods)
      end

      module ClassMethods
        def sidekiq_circuit_breaker_enabled?
          true
        end

        def sidekiq_circuit_breaker
          yield(sidekiq_circuit_breaker_options) if block_given?
        end

        def sidekiq_circuit_breaker_options
          @@setup ||= Sidekiq::CircuitBreaker::Configuration.new
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sidekiq-circuit-breaker-0.1.5 lib/sidekiq/circuit_breaker/worker.rb