1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
This commit is contained in:
Mike Perham 2022-09-22 14:07:36 -07:00
parent 0039b849c0
commit 89d00fbc8f
No known key found for this signature in database
3 changed files with 5 additions and 6 deletions

View file

@ -121,9 +121,9 @@ module Sidekiq
end
private def local_redis_pool
# this is our default client/housekeeping pool. each capsule has its
# this is our internal client/housekeeping pool. each capsule has its
# own pool for executing threads.
@redis ||= new_redis_pool(5, "global")
@redis ||= new_redis_pool(5, "internal")
end
def new_redis_pool(size, name = "unset")

View file

@ -6,7 +6,6 @@ module Sidekiq
class Embedded
include Sidekiq::Component
attr_accessor :config
def initialize(config)
@config = config
end
@ -14,9 +13,9 @@ module Sidekiq
def run
housekeeping
fire_event(:startup, reverse: false, reraise: true)
@launcher = Sidekiq::Launcher.new(@config, true)
@launcher = Sidekiq::Launcher.new(@config, embedded: true)
@launcher.run
sleep 0.1
sleep 0.1 # pause to give threads time to spin up
logger.info "Embedded mode running with #{Thread.list.size} threads"
logger.debug { Thread.list.map(&:name) }

View file

@ -22,7 +22,7 @@ module Sidekiq
attr_accessor :managers, :poller
def initialize(config, embedded = false)
def initialize(config, embedded: false)
@config = config
@embedded = embedded
@managers = config.capsules.values.map do |cap|