Class: ExceptionHunter::SendNotificationJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/exception_hunter/send_notification_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(serialized_notifier) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'app/jobs/exception_hunter/send_notification_job.rb', line 5

def perform(serialized_notifier)
  # Use SlackNotifierSerializer as it's the only one for now.
  serializer = ExceptionHunter::Notifiers::SlackNotifierSerializer
  deserialized_notifier = serializer.deserialize(serialized_notifier)
  deserialized_notifier.notify
rescue Exception # rubocop:disable Lint/RescueException
  # Suppress all exceptions to avoid loop as this would create a new error in EH.
  false
end