lib/sidekiq/web/application.rb in sidekiq-6.0.3 vs lib/sidekiq/web/application.rb in sidekiq-6.0.4

- old
+ new

@@ -88,10 +88,18 @@ erb(:queue) end post "/queues/:name" do - Sidekiq::Queue.new(route_params[:name]).clear + queue = Sidekiq::Queue.new(route_params[:name]) + + if Sidekiq.pro? && params["pause"] + queue.pause! + elsif Sidekiq.pro? && params["unpause"] + queue.unpause! + else + queue.clear + end redirect "#{root_path}queues" end post "/queues/:name/delete" do