From 4089e2b202a51f3a9dad40be209273fb5c1c4361 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Thu, 6 Mar 2014 21:33:45 -0800 Subject: [PATCH] Remove "Clear worker list" button, yay! --- lib/sidekiq/web.rb | 5 ----- test/test_web.rb | 20 -------------------- web/locales/en.yml | 1 - web/locales/ja.yml | 1 - web/locales/ko.yml | 1 - web/locales/nl.yml | 1 - web/locales/no.yml | 1 - web/locales/ru.yml | 1 - web/views/busy.erb | 9 --------- 9 files changed, 40 deletions(-) diff --git a/lib/sidekiq/web.rb b/lib/sidekiq/web.rb index f0506782..79fe5bcd 100644 --- a/lib/sidekiq/web.rb +++ b/lib/sidekiq/web.rb @@ -56,11 +56,6 @@ module Sidekiq erb :queue end - post "/reset" do - reset_worker_list - redirect root_path - end - post "/queues/:name" do Sidekiq::Queue.new(params[:name]).clear redirect "#{root_path}queues" diff --git a/test/test_web.rb b/test/test_web.rb index a9772efb..611af686 100644 --- a/test/test_web.rb +++ b/test/test_web.rb @@ -76,26 +76,6 @@ class TestWeb < Sidekiq::Test end end - it 'can clear an empty worker list' do - post '/reset' - assert_equal 302, last_response.status - end - - it 'can clear a non-empty worker list' do - Sidekiq.redis do |conn| - identity = 'foo' - conn.sadd('workers', identity) - end - - post '/reset' - - assert_equal 302, last_response.status - - Sidekiq.redis do |conn| - refute conn.smembers('workers').any? - end - end - it 'can delete a job' do Sidekiq.redis do |conn| conn.rpush('queue:foo', "{}") diff --git a/web/locales/en.yml b/web/locales/en.yml index acee8282..f52d230e 100644 --- a/web/locales/en.yml +++ b/web/locales/en.yml @@ -12,7 +12,6 @@ en: # <---- change this to your locale code Scheduled: Scheduled Retries: Retries Enqueued: Enqueued - ClearWorkerList: Clear workers list Worker: Worker Workers: Workers LivePoll: Live Poll diff --git a/web/locales/ja.yml b/web/locales/ja.yml index 0d48ce0e..c2543bf2 100644 --- a/web/locales/ja.yml +++ b/web/locales/ja.yml @@ -12,7 +12,6 @@ ja: Scheduled: 予定 Retries: 再試行 Enqueued: 待機状態 - ClearWorkerList: 動作中の作業を停止 Worker: 動作中の作業 Workers: 動作中の作業 LivePoll: ポーリング開始 diff --git a/web/locales/ko.yml b/web/locales/ko.yml index 88fd7899..a34ef80c 100644 --- a/web/locales/ko.yml +++ b/web/locales/ko.yml @@ -12,7 +12,6 @@ ko: Scheduled: 예약 Retries: 재시도 Enqueued: 대기 중 - ClearWorkerList: 워커 목록 비우기 Worker: 워커 Workers: 워커 LivePoll: 폴링 시작 diff --git a/web/locales/nl.yml b/web/locales/nl.yml index 6b558c8b..aa2140c8 100644 --- a/web/locales/nl.yml +++ b/web/locales/nl.yml @@ -12,7 +12,6 @@ nl: Scheduled: Gepland Retries: Opnieuw proberen Enqueued: In de wachtrij - ClearWorkerList: Werkerlijst legen Worker: Werker Workers: Werkers LivePoll: Live bijwerken diff --git a/web/locales/no.yml b/web/locales/no.yml index 5fa618a3..444ab436 100644 --- a/web/locales/no.yml +++ b/web/locales/no.yml @@ -12,7 +12,6 @@ no: Scheduled: Planlagt Retries: Forsøk Enqueued: I kø - ClearWorkerList: Nullstill jobbliste Worker: Arbeider Workers: Arbeidere LivePoll: Automatisk oppdatering diff --git a/web/locales/ru.yml b/web/locales/ru.yml index 56c9e862..be898d0e 100644 --- a/web/locales/ru.yml +++ b/web/locales/ru.yml @@ -11,7 +11,6 @@ ru: Scheduled: Запланировано Retries: Попыток Enqueued: В очереди - ClearWorkerList: Очистить список обработчиков Worker: Обработчик Workers: Обработчики LivePoll: Постоянный опрос diff --git a/web/views/busy.erb b/web/views/busy.erb index 03018c10..929714ae 100644 --- a/web/views/busy.erb +++ b/web/views/busy.erb @@ -49,12 +49,3 @@ <% end %> -<% if workers_size > 0 %> -
-
-
- -
-
-
-<% end %>