Skip to content

Commit

Permalink
Merge pull request #355 from zendesk/liveness-probe
Browse files Browse the repository at this point in the history
Fix config load for liveness probe
  • Loading branch information
dasch authored Oct 4, 2023
2 parents b8ed86b + 2d9222b commit 5bcd34a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/racecar/ctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ 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!
Expand Down Expand Up @@ -136,5 +138,9 @@ def parse_options!(args)

parser.parse!(args)
end

def config
Racecar.config
end
end
end

0 comments on commit 5bcd34a

Please sign in to comment.