Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
a-maas committed Mar 21, 2024
1 parent f6f587e commit e42736f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/vertex_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,17 @@ def circuit

def circuit_config_options
options = {}
circuit_config = configuration.circuit_config
non_proc_options = [:exceptions, :logger, :cache, :circuit_store, :notifier]

configuration.circuit_config.keys.each do |key|
options[key] = Proc.new { configuration.circuit_config[key] } unless key.to_sym == :exceptions
# Circuitbox requires that configurable options be passed as procs.
circuit_config.keys.each do |key|
options[key] = Proc.new { circuit_config[key] } unless non_proc_options.include?(key.to_sym)
end

options[:exceptions] = configuration.circuit_config[:exceptions]
non_proc_options.each do |key|
options[key] = circuit_config[key] if circuit_config[key]
end

options
end
Expand Down

0 comments on commit e42736f

Please sign in to comment.