mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-29 22:06:22 +00:00
fix: notificar las excepciones manualmente
por alguna razón sucker punch dejó de enviarlas!
This commit is contained in:
parent
1d08b3fdcd
commit
e0a7232643
1 changed files with 8 additions and 0 deletions
|
@ -37,6 +37,8 @@ class DeployJob < ApplicationJob
|
||||||
end
|
end
|
||||||
|
|
||||||
deploy_others
|
deploy_others
|
||||||
|
rescue DeployException => e
|
||||||
|
notify_exception e
|
||||||
ensure
|
ensure
|
||||||
@site&.update status: 'waiting'
|
@site&.update status: 'waiting'
|
||||||
|
|
||||||
|
@ -47,6 +49,12 @@ class DeployJob < ApplicationJob
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
# @param :exception [StandardError]
|
||||||
|
# @param :deploy [Deploy]
|
||||||
|
def notify_exception(exception, deploy = nil)
|
||||||
|
ExceptionNotifier.notify_exception(exception, data: { site: @site.id, deploy: deploy&.type })
|
||||||
|
end
|
||||||
|
|
||||||
def deploy_local
|
def deploy_local
|
||||||
@deploy_local ||= @site.deploys.find_by(type: 'DeployLocal')
|
@deploy_local ||= @site.deploys.find_by(type: 'DeployLocal')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue