INNER CODE UNIT · Ruby
boot_standalone
reidmorrison/rocketjob · lib/rocket_job/cli.rb:98
def boot_standalone
# Try to load bundler if present
begin
require "bundler/setup"
Bundler.require(environment)
rescue LoadError
nil
end
require "rocketjob"
# Log to file except when booting rails, when it will add the log file path
path = log_file ? Pathname.new(log_file) : Pathname.pwd.join("log/#{environment}.log")
path.dirname.mkpath
SemanticLogger.add_appender(file_name: path.to_s, formatter: :color)
logger.info "Rails not detected. Running standalone: #{environment}"
RocketJob::Config.load!(environment, mongo_config, symmetric_encryption_config)