(maint) fix variable reference in new_metrics

This was referencing config directly, when what we want is for a
hash to be passed in (derived from config).
This commit is contained in:
Rick Bradley 2016-07-12 15:36:59 -05:00
parent c49c252f8f
commit ac2b7c090c

View file

@ -72,10 +72,10 @@ module Vmpooler
end
def self.new_metrics(params)
if config[:statsd]
Vmpooler::Statsd.new(config[:statsd])
elsif config[:graphite]
Vmpooler::Graphite.new(config[:graphite])
if params[:statsd]
Vmpooler::Statsd.new(params[:statsd])
elsif params[:graphite]
Vmpooler::Graphite.new(params[:graphite])
else
Vmpooler::DummyStatsd.new
end