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:
parent
b9bfc03c68
commit
82c43d2447
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -34,7 +34,7 @@ module Sidekiq
|
|||
@pushed ||= []
|
||||
end
|
||||
|
||||
def perform
|
||||
def drain
|
||||
while job = jobs.shift do
|
||||
new.perform(*job['args'])
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue