Skip to content

Commit

Permalink
Update checkout action
Browse files Browse the repository at this point in the history
  • Loading branch information
djmb committed Aug 3, 2023
1 parent de20041 commit 2478c8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
TARGET_DB: ${{ matrix.database }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
Expand Down
6 changes: 5 additions & 1 deletion lib/solid_cache/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ def initialize(options = {})
super(options)
@max_key_bytesize = MAX_KEY_BYTESIZE
@error_handler = options.delete(:error_handler) || DEFAULT_ERROR_HANDLER
clusters_options = (options.key?(:cluster) ? [options.delete(:cluster)] : options.delete(:clusters)) || [{}]

clusters_options = options.key?(:cluster) ? [options.delete(:cluster)] : options.delete(:clusters)
clusters_options ||= [{}]

@clusters = clusters_options.map.with_index do |cluster_options, index|
Cluster.new(options.merge(cluster_options).merge(async_writes: index != 0))
end

@primary_cluster = clusters.first
end

Expand Down

0 comments on commit 2478c8f

Please sign in to comment.