2020-06-12 17:42:47 +00:00
|
|
|
class HookJob < ApplicationJob
|
|
|
|
queue_as :integrations
|
|
|
|
|
|
|
|
def perform(hook, message)
|
|
|
|
return unless hook.slack?
|
|
|
|
|
2020-06-25 18:05:16 +00:00
|
|
|
Integrations::Slack::SendOnSlackService.new(message: message, hook: hook).perform
|
2020-06-12 17:42:47 +00:00
|
|
|
rescue StandardError => e
|
|
|
|
Raven.capture_exception(e)
|
|
|
|
end
|
|
|
|
end
|