Skip to content

Commit

Permalink
Add Sidekiq::ServerMiddleware module
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiroe committed Jul 12, 2024
1 parent 0233af5 commit 264c16b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions gems/sidekiq/7.0/_test/test_2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Hook
end

class Middleware
include Sidekiq::ServerMiddleware
end

HardWorker.perform_async(1, 2, 3)
Expand Down
10 changes: 10 additions & 0 deletions gems/sidekiq/7.0/middleware.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,14 @@ module Sidekiq
def initialize: (untyped config, Class klass, *untyped args) -> void
end
end

module ServerMiddleware
attr_accessor config: Config

def redis_pool: () -> ConnectionPool[RedisClientAdapter]

def logger: () -> Logger

def redis: () { (RedisClientAdapter::CompatClient) -> void } -> void
end
end

0 comments on commit 264c16b

Please sign in to comment.