Skip to content

Commit

Permalink
Add option to set saver's hostname via an env-var ready for ECS
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Jul 21, 2022
1 parent f05a57c commit 8f8a104
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/external/saver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ module External
class Saver

def initialize(externals)
hostname = 'saver'
hostname = ENV['CYBER_DOJO_SAVER_HOSTNAME']
if hostname.nil?
hostname = 'saver'
end
@port = ENV[port_env_var].to_i
@http = HttpJsonHash::service(self.class.name, externals.saver_http, hostname, port)
end
Expand Down
6 changes: 3 additions & 3 deletions test/lib/metrics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

app: {
lines: {
total:360,
total:362,
missed:0,
},
branches: {
total:54,
missed:0,
total:56,
missed:1,
}
},

Expand Down

0 comments on commit 8f8a104

Please sign in to comment.