diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-08-23 12:31:17 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-08-23 12:31:17 +0300 |
commit | fbe82e4cd9f4cda7264bb78eab9c5c55e6311518 (patch) | |
tree | de9444c1762fa43c336f595936878677aef8ce43 /app/models/commit_status.rb | |
parent | 64820f9a6c17a348dc771a87618140a5c3c8874d (diff) | |
parent | 101d52b360a6a43f1633c5dd60b78e37bc8c4339 (diff) |
Merge branch 'master' into issue-discussions-refactor
# Conflicts:
# package.json
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 07cec63b939..842c6e5cb50 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -39,14 +39,14 @@ class CommitStatus < ActiveRecord::Base scope :after_stage, -> (index) { where('stage_idx > ?', index) } state_machine :status do - event :enqueue do - transition [:created, :skipped, :manual] => :pending - end - event :process do transition [:skipped, :manual] => :created end + event :enqueue do + transition [:created, :skipped, :manual] => :pending + end + event :run do transition pending: :running end @@ -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 |