Skip to content
Snippets Groups Projects
Commit 865de49b authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Update related stage status when job status is changed

parent 8657d5dd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -17,6 +17,8 @@ module Ci
validates :pipeline, presence: true, unless: :importing?
validates :name, presence: true, unless: :importing?
 
## TODO, should we extract these events to `Ci::Eventable`?
#
state_machine :status, initial: :created do
event :enqueue do
transition created: :pending
Loading
Loading
Loading
Loading
@@ -91,6 +91,7 @@ class CommitStatus < ActiveRecord::Base
end
end
 
StageUpdateWorker.perform_async(commit_status.stage_id)
ExpireJobCacheWorker.perform_async(commit_status.id)
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment