Revert "reload instead, so that we don't have to change order"
This reverts commit 575dc2b0d7
.
This commit is contained in:
parent
575dc2b0d7
commit
6baf9971db
1 changed files with 5 additions and 12 deletions
|
@ -69,20 +69,13 @@ class CommitStatus < ActiveRecord::Base
|
|||
commit_status.update_attributes finished_at: Time.now
|
||||
end
|
||||
|
||||
# We use around_transition to process pipeline on next stages as soon as possible, before the `after_*` is executed
|
||||
around_transition any => [:success, :failed, :canceled] do |commit_status, block|
|
||||
block.call
|
||||
|
||||
commit_status.pipeline.try(:process!)
|
||||
true
|
||||
after_transition do |commit_status, transition|
|
||||
commit_status.pipeline.try(:build_updated) unless transition.loopback?
|
||||
end
|
||||
|
||||
after_transition do |commit_status, transition|
|
||||
pipeline = commit_status.pipeline
|
||||
if !transition.loopback? && pipeline
|
||||
pipeline.reload
|
||||
pipeline.build_updated
|
||||
end
|
||||
after_transition any => [:success, :failed, :canceled] do |commit_status|
|
||||
commit_status.pipeline.try(:process!)
|
||||
true
|
||||
end
|
||||
|
||||
after_transition [:created, :pending, :running] => :success do |commit_status|
|
||||
|
|
Loading…
Reference in a new issue