Skip to content

Commit

Permalink
chore(lint): lint'em real good
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenrixon committed Nov 11, 2023
1 parent f97ac7c commit 61352c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/sidekiq_unique_jobs/lock_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ def errors_as_string

# the strategy to use as conflict resolution from sidekiq client
def on_client_conflict
if on_conflict.is_a?(Hash)
@on_client_conflict ||= on_conflict["client"] || on_conflict[:client]
@on_client_conflict ||= if on_conflict.is_a?(Hash)
on_conflict["client"] || on_conflict[:client]
else
@on_client_conflict ||= on_conflict
on_conflict
end
end

# the strategy to use as conflict resolution from sidekiq server
def on_server_conflict
if on_conflict.is_a?(Hash)
@on_server_conflict ||= on_conflict["server"] || on_conflict[:server]
@on_server_conflict ||= if on_conflict.is_a?(Hash)
on_conflict["server"] || on_conflict[:server]
else
@on_server_conflict ||= on_conflict
on_conflict
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/sidekiq_unique_jobs/lock_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
end

context "when on_conflict is defined only for server" do
let(:on_conflict) { {server: :log}}
let(:on_conflict) { { server: :log } }

it { is_expected.to be_nil }
end
Expand All @@ -166,7 +166,7 @@
end

context "when on_conflict is defined only for client" do
let(:on_conflict) { {client: :log}}
let(:on_conflict) { { client: :log } }

it { is_expected.to be_nil }
end
Expand Down

0 comments on commit 61352c4

Please sign in to comment.