From 89d00fbc8f24612bb60c5a7340679aa433d8dd57 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Thu, 22 Sep 2022 14:07:36 -0700 Subject: [PATCH] polish --- lib/sidekiq/config.rb | 4 ++-- lib/sidekiq/embedded.rb | 5 ++--- lib/sidekiq/launcher.rb | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/sidekiq/config.rb b/lib/sidekiq/config.rb index 838f5b07..ec5142e7 100644 --- a/lib/sidekiq/config.rb +++ b/lib/sidekiq/config.rb @@ -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") diff --git a/lib/sidekiq/embedded.rb b/lib/sidekiq/embedded.rb index e5f965db..ca1458d1 100644 --- a/lib/sidekiq/embedded.rb +++ b/lib/sidekiq/embedded.rb @@ -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) } diff --git a/lib/sidekiq/launcher.rb b/lib/sidekiq/launcher.rb index 8e6761ac..e90fbd22 100644 --- a/lib/sidekiq/launcher.rb +++ b/lib/sidekiq/launcher.rb @@ -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|