mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
parent
76bef8ff5b
commit
f431a00e86
2 changed files with 8 additions and 2 deletions
|
@ -41,7 +41,9 @@ module Sidekiq
|
|||
def reset_worker_list
|
||||
Sidekiq.redis do |conn|
|
||||
workers = conn.smembers('workers')
|
||||
conn.srem('workers', *workers)
|
||||
workers.each do |name|
|
||||
conn.srem('workers', name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -76,6 +76,11 @@ class TestWeb < Minitest::Test
|
|||
end
|
||||
end
|
||||
|
||||
it 'can clear the worker list' do
|
||||
post '/reset'
|
||||
assert_equal 302, last_response.status
|
||||
end
|
||||
|
||||
it 'can delete a job' do
|
||||
Sidekiq.redis do |conn|
|
||||
conn.rpush('queue:foo', "{}")
|
||||
|
@ -191,7 +196,6 @@ class TestWeb < Minitest::Test
|
|||
assert_equal 200, last_response.status
|
||||
assert_match /#{params[0]['args'][2]}/, last_response.body
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
it 'can retry all retries' do
|
||||
|
|
Loading…
Reference in a new issue