1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/lib/sidekiq/middleware/modules.rb
Mike Perham 8269205a73 notes
2022-06-10 11:35:59 -07:00

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