2019-03-26 15:32:20 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-09-16 16:44:29 +00:00
|
|
|
# Base para trabajos
|
2018-01-02 17:19:25 +00:00
|
|
|
class ApplicationJob < ActiveJob::Base
|
2023-03-28 23:21:52 +00:00
|
|
|
include Que::ActiveJob::JobExtensions
|
2020-05-30 19:43:25 +00:00
|
|
|
|
2024-04-09 17:16:01 +00:00
|
|
|
# Si falla por cualquier cosa informar y descartar
|
|
|
|
discard_on(Exception) do |error|
|
|
|
|
ExceptionNotifier.notify_exception(error, data: { site: site.name })
|
|
|
|
end
|
|
|
|
|
2020-05-30 19:43:25 +00:00
|
|
|
private
|
|
|
|
|
|
|
|
def site
|
|
|
|
@site ||= Site.find @params[:site_id]
|
|
|
|
end
|
2018-01-02 17:19:25 +00:00
|
|
|
end
|