Method: QueryTrack::EventProcessor#call

Defined in:
lib/query_track/event_processor.rb

#callObject



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/query_track/event_processor.rb', line 10

def call
  unsubscribe
  return unless QueryTrack::Settings.config.duration && QueryTrack::Settings.config.enabled

  return if under_filter?(caller)

  return unless duration_seconds > QueryTrack::Settings.config.duration

  QueryTrack::Notifications::Slack.new(event.payload[:sql], duration_seconds).call
  QueryTrack::Notifications::Log.new(event.payload[:sql], duration_seconds).call
  QueryTrack::Notifications::Custom.new(event.payload[:sql], duration_seconds).call
end