Aanpassingen aan de sidekiq initialisatieconfiguratie

Does the specific position in the stack matter? I tried this in a plugin.rb and it seemed to add the middleware :crossed_fingers:

class BreakEverythingMiddleware
  def call(worker, job, queue)
    puts "The middleware worked!"
    raise "THE MIDDLEWARE WORKED"
  end
end

Sidekiq.default_configuration.server_middleware { |chain| chain.add BreakEverythingMiddleware }
1 like