1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Renamed perform to drain to match Rails 4 API.

This commit is contained in:
Pan Thomakos 2012-05-02 10:59:31 -07:00
parent b9bfc03c68
commit 82c43d2447
3 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ end
- Fix delayed extensions not available in workers [#152]
- In test environments add the `#perform` class method to workers. This method
- In test environments add the `#drain` class method to workers. This method
executes all previously queued jobs. (panthomakos)
1.1.4

View file

@ -34,7 +34,7 @@ module Sidekiq
@pushed ||= []
end
def perform
def drain
while job = jobs.shift do
new.perform(*job['args'])
end

View file

@ -89,7 +89,7 @@ class TestTesting < MiniTest::Unit::TestCase
assert_equal 2, StoredWorker.jobs.size
assert_raises PerformError do
StoredWorker.perform
StoredWorker.drain
end
assert_equal 0, StoredWorker.jobs.size
end