Skip to content

Commit

Permalink
Fix merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
djmb committed Aug 3, 2023
1 parent 405123e commit f702f36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/solid_cache/cluster/async_execution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module SolidCache
class Cluster
module AsyncExecution
def initialize(options)
super(options)
super()
@executor = Concurrent::SingleThreadExecutor.new(max_queue: 100, fallback_policy: :discard)
end

Expand Down
4 changes: 2 additions & 2 deletions lib/solid_cache/cluster/connection_handling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def reading_across_shards(list:)
end

def writing_shard(normalized_key:, trim: false)
with_shard(shard: shard_for_normalized_key(normalized_key)) do
with_shard(shard_for_normalized_key(normalized_key)) do
async_if_required do
result = yield
trim(1) if trim
Expand All @@ -52,7 +52,7 @@ def reading_shard(normalized_key:)
end

private
def with_shard(shard:)
def with_shard(shard)
if shard
Record.connected_to(shard: shard) { yield }
else
Expand Down
4 changes: 2 additions & 2 deletions lib/solid_cache/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def read_entry(key, **options)
end

def read_serialized_entry(key, raw: false, **options)
primary_cluster.with_shard_for_key(normalized_key: key) do
primary_cluster.reading_shard(normalized_key: key) do
failsafe(:read_entry) do
Entry.get(key)
end
Expand Down Expand Up @@ -219,7 +219,7 @@ def failsafe(method, returning: nil)

def writing_key(key, trim: false)
writing_clusters do |cluster|
cluster.with_shard_for_key(normalized_key: key, trim: trim) do
cluster.writing_shard(normalized_key: key, trim: trim) do
yield
end
end
Expand Down

0 comments on commit f702f36

Please sign in to comment.