Commit 7f270d04 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Do not return false in commit status transition

parent 4e4640b1
...@@ -71,7 +71,7 @@ class CommitStatus < ActiveRecord::Base ...@@ -71,7 +71,7 @@ class CommitStatus < ActiveRecord::Base
after_transition do |commit_status, transition| after_transition do |commit_status, transition|
commit_status.pipeline.try do |pipeline| commit_status.pipeline.try do |pipeline|
return false if transition.loopback? break if transition.loopback?
if commit_status.complete? if commit_status.complete?
ProcessPipelineWorker.perform_async(pipeline.id) ProcessPipelineWorker.perform_async(pipeline.id)
......
...@@ -4,8 +4,7 @@ class ProcessPipelineWorker ...@@ -4,8 +4,7 @@ class ProcessPipelineWorker
sidekiq_options queue: :default sidekiq_options queue: :default
def perform(pipeline_id) def perform(pipeline_id)
Ci::Pipeline.find_by(id: pipeline_id).try do |pipeline| Ci::Pipeline.find_by(id: pipeline_id)
pipeline.process! .try(:process!)
end
end end
end end
...@@ -4,8 +4,7 @@ class UpdatePipelineWorker ...@@ -4,8 +4,7 @@ class UpdatePipelineWorker
sidekiq_options queue: :default sidekiq_options queue: :default
def perform(pipeline_id) def perform(pipeline_id)
Ci::Pipeline.find_by(id: pipeline_id).try do |pipeline| Ci::Pipeline.find_by(id: pipeline_id)
pipeline.update_status .try(:update_status)
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment