Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Commit

Permalink
touch the pool before startup event
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Oct 20, 2015
1 parent 9a88a1f commit 6f1e0b0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/sidekiq/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,19 @@ def run
logger.info Sidekiq::LICENSE
logger.info "Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org" unless defined?(::Sidekiq::Pro)

Sidekiq.redis do |conn|
# touch the connection pool so it is created before we
# fire startup and start multithreading.
end

# Before this point, the process is initializing with just the main thread.
# Starting here the process will now have multiple threads running.
fire_event(:startup)

logger.debug {
"Middleware: #{Sidekiq.server_middleware.map(&:klass).join(', ')}"
}

Sidekiq.redis do |conn|
# touch the connection pool so it is created before we
# launch the actors.
end

if !options[:daemon]
logger.info 'Starting processing, hit Ctrl-C to stop'
end
Expand Down

0 comments on commit 6f1e0b0

Please sign in to comment.