mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
21 lines
408 B
Ruby
21 lines
408 B
Ruby
module Sidekiq
|
|
# Server-side middleware must import this Module in order
|
|
# to get access to server resources during `call`.
|
|
module ServerMiddleware
|
|
attr_accessor :config
|
|
def redis_pool
|
|
config.redis_pool
|
|
end
|
|
|
|
def logger
|
|
config.logger
|
|
end
|
|
|
|
def redis(&block)
|
|
config.redis(&block)
|
|
end
|
|
end
|
|
|
|
# no difference for now
|
|
ClientMiddleware = ServerMiddleware
|
|
end
|