Fix statsd null backend not being initialized properly

signup-info-prompt glitch/v0.9.9
Eugen Rochko 2017-01-19 09:37:07 +01:00
parent 8b9206f7d9
commit f051c2e813
4 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,7 @@ gem 'dotenv-rails'
gem 'font-awesome-rails' gem 'font-awesome-rails'
gem 'best_in_place', '~> 3.0.1' gem 'best_in_place', '~> 3.0.1'
gem 'paperclip', '~> 5.0' gem 'paperclip', '~> 5.1'
gem 'paperclip-av-transcoder' gem 'paperclip-av-transcoder'
gem 'aws-sdk', '>= 2.0' gem 'aws-sdk', '>= 2.0'

View File

@ -76,8 +76,7 @@ GEM
bullet (5.3.0) bullet (5.3.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
uniform_notifier (~> 1.10.0) uniform_notifier (~> 1.10.0)
climate_control (0.0.3) climate_control (0.1.0)
activesupport (>= 3.0)
cocaine (0.5.8) cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0) climate_control (>= 0.0.3, < 1.0)
coderay (1.1.1) coderay (1.1.1)
@ -89,7 +88,7 @@ GEM
execjs execjs
coffee-script-source (1.10.0) coffee-script-source (1.10.0)
colorize (0.8.1) colorize (0.8.1)
concurrent-ruby (1.0.3) concurrent-ruby (1.0.4)
connection_pool (2.2.1) connection_pool (2.2.1)
crack (0.4.3) crack (0.4.3)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
@ -437,7 +436,7 @@ DEPENDENCIES
nokogiri nokogiri
oj oj
ostatus2 ostatus2
paperclip (~> 5.0) paperclip (~> 5.1)
paperclip-av-transcoder paperclip-av-transcoder
pg pg
pg_search pg_search

View File

@ -127,6 +127,7 @@ class Account < ApplicationRecord
save! save!
rescue ActiveRecord::RecordInvalid rescue ActiveRecord::RecordInvalid
self.avatar = nil self.avatar = nil
self[:avatar_remote_url] = ''
save! save!
end end

View File

@ -106,6 +106,6 @@ Rails.application.configure do
config.active_record.logger = nil config.active_record.logger = nil
config.to_prepare do config.to_prepare do
StatsD.backend = StatsD::Instrument::Backends::NullBackend if ENV['STATSD_ADDR'].blank? StatsD.backend = StatsD::Instrument::Backends::NullBackend.new if ENV['STATSD_ADDR'].blank?
end end
end end