Skip to content

Commit

Permalink
Fix statsd null backend not being initialized properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron committed Jan 19, 2017
1 parent 8b9206f commit f051c2e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ gem 'dotenv-rails'
gem 'font-awesome-rails'
gem 'best_in_place', '~> 3.0.1'

gem 'paperclip', '~> 5.0'
gem 'paperclip', '~> 5.1'
gem 'paperclip-av-transcoder'
gem 'aws-sdk', '>= 2.0'

Expand Down
7 changes: 3 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ GEM
bullet (5.3.0)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.10.0)
climate_control (0.0.3)
activesupport (>= 3.0)
climate_control (0.1.0)
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.1)
Expand All @@ -89,7 +88,7 @@ GEM
execjs
coffee-script-source (1.10.0)
colorize (0.8.1)
concurrent-ruby (1.0.3)
concurrent-ruby (1.0.4)
connection_pool (2.2.1)
crack (0.4.3)
safe_yaml (~> 1.0.0)
Expand Down Expand Up @@ -437,7 +436,7 @@ DEPENDENCIES
nokogiri
oj
ostatus2
paperclip (~> 5.0)
paperclip (~> 5.1)
paperclip-av-transcoder
pg
pg_search
Expand Down
3 changes: 2 additions & 1 deletion app/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def subscription(webhook_url)
def save_with_optional_avatar!
save!
rescue ActiveRecord::RecordInvalid
self.avatar = nil
self.avatar = nil
self[:avatar_remote_url] = ''
save!
end

Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@
config.active_record.logger = nil

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

0 comments on commit f051c2e

Please sign in to comment.