require_relative "sidekiq/merger"

Sidekiq.configure_client do |config|
  config.client_middleware do |chain|
    chain.add Sidekiq::Merger::Middleware
  end
end

Sidekiq.configure_server do |config|
  config.server_middleware do |chain|
    chain.add Sidekiq::Merger::Middleware
  end
end

if Sidekiq.server?
  task = Sidekiq::Merger.create_task
  task.execute
end

require_relative "sidekiq/merger"

Sidekiq.configure_client do |config|
  config.client_middleware do |chain|
    chain.add Sidekiq::Merger::Middleware
  end
end

Sidekiq.configure_server do |config|
  config.client_middleware do |chain|
    chain.add Sidekiq::Merger::Middleware
  end
end

if Sidekiq.server?
  task = Sidekiq::Merger.create_task
  task.execute
end

Revert "fix(middleware): fix server_middleware register step"
Revert "fix(middleware): fix server_middleware register step"

This reverts commit f93896d582f29da1854dccdd0e52795e0c39832c.
