diff options
Diffstat (limited to 'app/models')
-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 |