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

Clean up deprecations

This commit is contained in:
Mike Perham 2013-10-23 21:58:15 -07:00
parent b76ac9464c
commit fef6dac26c
3 changed files with 7 additions and 7 deletions

View file

@ -1,6 +1,7 @@
2.16.0
-----------
- Deprecate `Sidekiq::Client.registered_workers` and `Sidekiq::Client.registered_queues`
- Refactor Sidekiq::Client to be instance-based [#1279]
- Pass all Redis options to the Redis driver so Unix sockets
can be fully configured. [#1270, salimane]

View file

@ -77,7 +77,7 @@ module Sidekiq
end
end
def self.client_middleware(&block)
def self.client_middleware
@client_chain ||= Middleware::Chain.new
yield @client_chain if block_given?
@client_chain

View file

@ -1,5 +1,4 @@
require 'securerandom'
require 'sidekiq/middleware/chain'
module Sidekiq
@ -41,7 +40,7 @@ module Sidekiq
# Returns nil if not pushed to Redis or a unique Job ID if pushed.
#
# Example:
# Sidekiq::Client.push('queue' => 'my_queue', 'class' => MyWorker, 'args' => ['foo', 1, :bat => 'bar'])
# push('queue' => 'my_queue', 'class' => MyWorker, 'args' => ['foo', 1, :bat => 'bar'])
#
def push(item)
normed = normalize_item(item)
@ -57,7 +56,7 @@ module Sidekiq
# useful if you are pushing tens of thousands of jobs or more. This method
# basically cuts down on the redis round trip latency.
#
# Takes the same arguments as Client.push except that args is expected to be
# Takes the same arguments as #push except that args is expected to be
# an Array of Arrays. All other keys are duplicated for each job. Each job
# is run through the client middleware pipeline and each job gets its own Job ID
# as normal.
@ -84,14 +83,14 @@ module Sidekiq
# deprecated
def registered_workers
puts "Deprecated, please use Sidekiq::Workers.new"
puts "registered_workers is deprecated, please use Sidekiq::Workers.new"
Sidekiq.redis { |x| x.smembers('workers') }
end
# deprecated
def registered_queues
puts "Deprecated, please use Sidekiq::Queue.all"
Sidekiq.redis { |x| x.smembers('queues') }
puts "registered_queues is deprecated, please use Sidekiq::Queue.all"
Sidekiq::Queue.all.map(&:name)
end
def push(item)