lib/sidekiq/circuit_breaker/worker.rb in sidekiq-circuit-breaker-0.1.4 vs lib/sidekiq/circuit_breaker/worker.rb in sidekiq-circuit-breaker-0.1.5
- old
+ new
@@ -5,31 +5,9 @@
module Worker
def self.included(base)
base.extend(ClassMethods)
end
- def sidekiq_circuit_breaker_manager(args)
- options = self.class.sidekiq_circuit_breaker_options
- scope = scope(args)
- CircuitBreaker::Manager.new(scope, options)
- end
-
- private
-
- def scope(args)
- options = self.class.sidekiq_circuit_breaker_options
- extract_scope(options, args) || self.class.name
- end
-
- def extract_scope(options, args)
- scope = options.scope
- return scope if scope.is_a?(String)
- return unless scope.respond_to?(:call)
-
- options.scope.call(*args)
- end
-
-
module ClassMethods
def sidekiq_circuit_breaker_enabled?
true
end