diff --git a/lib/sidekiq_unique_jobs/middleware.rb b/lib/sidekiq_unique_jobs/middleware.rb index 3e72aa4bf..4720c343d 100644 --- a/lib/sidekiq_unique_jobs/middleware.rb +++ b/lib/sidekiq_unique_jobs/middleware.rb @@ -17,11 +17,6 @@ def configure_middleware def configure_server_middleware Sidekiq.configure_server do |config| - config.client_middleware do |chain| - require 'sidekiq_unique_jobs/client/middleware' - chain.add SidekiqUniqueJobs::Client::Middleware - end - config.server_middleware do |chain| require 'sidekiq_unique_jobs/server/middleware' chain.add SidekiqUniqueJobs::Server::Middleware diff --git a/lib/sidekiq_unique_jobs/on_conflict.rb b/lib/sidekiq_unique_jobs/on_conflict.rb index 1ebc6d25d..7dd390a67 100644 --- a/lib/sidekiq_unique_jobs/on_conflict.rb +++ b/lib/sidekiq_unique_jobs/on_conflict.rb @@ -14,6 +14,7 @@ module OnConflict log: OnConflict::Log, raise: OnConflict::Raise, reject: OnConflict::Reject, + replace: OnConflict::Replace, reschedule: OnConflict::Reschedule, }.freeze diff --git a/spec/unit/sidekiq_unique_jobs/middleware_spec.rb b/spec/unit/sidekiq_unique_jobs/middleware_spec.rb index 82cb16d73..d2a77b038 100644 --- a/spec/unit/sidekiq_unique_jobs/middleware_spec.rb +++ b/spec/unit/sidekiq_unique_jobs/middleware_spec.rb @@ -21,9 +21,6 @@ it 'adds client and server middleware when required' do expect(Sidekiq).to receive(:configure_server).and_yield(server_config) - expect(server_config).to receive(:client_middleware).and_yield(client_middleware) - expect(client_middleware).to receive(:add).with(SidekiqUniqueJobs::Client::Middleware) - expect(server_config).to receive(:server_middleware).and_yield(server_middleware) expect(server_middleware).to receive(:add).with(SidekiqUniqueJobs::Server::Middleware) described_class.configure_server_middleware