1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

prep for preload, #4646

This commit is contained in:
Mike Perham 2020-07-21 09:57:56 -07:00
parent f9f3959c34
commit 06804f55e2

View file

@ -33,8 +33,9 @@ module Sidekiq
# Code within this method is not tested because it alters
# global process state irreversibly. PRs which improve the
# test coverage of Sidekiq::CLI are welcomed.
def run
boot_system
def run(boot_app: true)
boot_application if boot_app
if environment == "development" && $stdout.tty? && Sidekiq.log_formatter.is_a?(Sidekiq::Logger::Formatters::Pretty)
print_banner
end
@ -239,7 +240,7 @@ module Sidekiq
Sidekiq.options
end
def boot_system
def boot_application
ENV["RACK_ENV"] = ENV["RAILS_ENV"] = environment
if File.directory?(options[:require])