mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 22:26:22 +00:00
Merge branch 'issue-10031' into informative-deploys
This commit is contained in:
commit
3a52633ae0
1 changed files with 9 additions and 1 deletions
|
@ -44,6 +44,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'
|
||||||
|
|
||||||
|
@ -54,6 +56,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
|
||||||
|
@ -71,7 +79,7 @@ class DeployJob < ApplicationJob
|
||||||
status = false
|
status = false
|
||||||
seconds = 0
|
seconds = 0
|
||||||
|
|
||||||
ExceptionNotifier.notify_exception(e, data: { site: site.id, deploy: d.type })
|
notify_exception e, d
|
||||||
end
|
end
|
||||||
|
|
||||||
@deployed[d.type.underscore.to_sym] = {
|
@deployed[d.type.underscore.to_sym] = {
|
||||||
|
|
Loading…
Reference in a new issue