5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 15:51:41 +00:00

fix: no fallar la segunda vez que se reporta el issue

This commit is contained in:
f 2023-03-13 20:42:40 -03:00
parent df3faba784
commit 72f982ee76

View file

@ -37,7 +37,7 @@ class GitlabNotifierJob < ApplicationJob
}
end
unless @issue['iid']
if @issue['iid'].blank? && issue_data[:issue].blank?
Rails.cache.delete(cache_key)
raise GitlabNotifierError, @issue.dig('message', 'title')&.join(', ')
end
@ -62,7 +62,7 @@ class GitlabNotifierJob < ApplicationJob
# Si este trabajo genera una excepción va a entrar en un loop, así que
# la notificamos por correo
rescue Exception => e
email_notification.call(e)
email_notification.call(e, data: @issue)
email_notification.call(exception, options)
end