Class: Salemove::ProcessHandler::NotifierFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/salemove/process_handler/notifier_factory.rb

Class Method Summary collapse

Class Method Details

.get_notifier(env, conf) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/salemove/process_handler/notifier_factory.rb', line 7

def self.get_notifier(env, conf)
  if conf && conf[:type] == 'airbrake'
    Airbrake.configure do |airbrake|
      airbrake.async = true
      airbrake.environment_name = env
      airbrake.host = conf.fetch(:host)
      airbrake.api_key = conf.fetch(:api_key)
    end
    Airbrake
  end
end