diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-24 11:34:01 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-24 11:34:01 +0200 |
commit | 865de49b0832dc1e2fa74034a25d186980b6a361 (patch) | |
tree | 3315349cadf5fc0d069188b4b487b14fbfea987f | |
parent | 8657d5dd8af6c365b41d7c2997e6e5c9e18e8241 (diff) | |
download | gitlab-ce-865de49b0832dc1e2fa74034a25d186980b6a361.tar.gz |
Update related stage status when job status is changed
-rw-r--r-- | app/models/ci/stage.rb | 2 | ||||
-rw-r--r-- | app/models/commit_status.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb index 066903ddc5b..78caa70e52e 100644 --- a/app/models/ci/stage.rb +++ b/app/models/ci/stage.rb @@ -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 diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index d7418a07177..842c6e5cb50 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -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 |