lib/racecar/ctl.rb in racecar-2.9.0 vs lib/racecar/ctl.rb in racecar-2.10.0.beta1
- old
+ new
@@ -34,12 +34,14 @@
def liveness_probe(args)
require "racecar/liveness_probe"
parse_options!(args)
- if ENV["RAILS_ENV"]
- Racecar.config.load_file("config/racecar.yml", ENV["RAILS_ENV"])
+ RailsConfigFileLoader.load! unless config.without_rails?
+
+ if File.exist?("config/racecar.rb")
+ require "./config/racecar"
end
Racecar.config.liveness_probe.check_liveness_within_interval!
end
@@ -133,8 +135,12 @@
Racecar.config.pidfile = File.expand_path(path)
end
end
parser.parse!(args)
+ end
+
+ def config
+ Racecar.config
end
end
end