make a method in EnviromentConfiguration to test if newrelic is setup
This commit is contained in:
parent
5ee2a17d16
commit
41ecf2b27d
2 changed files with 5 additions and 3 deletions
|
|
@ -3,15 +3,13 @@
|
|||
# the COPYRIGHT file.
|
||||
|
||||
require File.join(Rails.root, 'lib', 'stream', 'public')
|
||||
require 'newrelic_rpm' if File.exists?(File.expand_path("#{Rails.root}/config/newrelic.yml", __FILE__))
|
||||
|
||||
class PublicsController < ApplicationController
|
||||
require File.join(Rails.root, '/lib/diaspora/parser')
|
||||
require File.join(Rails.root, '/lib/postzord/receiver/public')
|
||||
require File.join(Rails.root, '/lib/postzord/receiver/private')
|
||||
include Diaspora::Parser
|
||||
|
||||
newrelic_ignore if File.exists?(File.expand_path("#{Rails.root}/config/newrelic.yml", __FILE__))
|
||||
newrelic_ignore if EnviromentConfiguration.using_new_relic?
|
||||
|
||||
skip_before_filter :set_header_data
|
||||
skip_before_filter :which_action_and_user
|
||||
|
|
|
|||
|
|
@ -36,4 +36,8 @@ module EnviromentConfiguration
|
|||
AppConfig[:ca_file]
|
||||
end
|
||||
end
|
||||
|
||||
def self.using_new_relic?
|
||||
defined?(NewRelic) && AppConfig['NEW_RELIC_LICENSE_KEY'].present?
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue