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
after_transition do |commit_status, transition|
commit_status.pipeline.try do |pipeline|
return false if transition.loopback?
break if transition.loopback?
if commit_status.complete?
ProcessPipelineWorker.perform_async(pipeline.id)
......
......@@ -4,8 +4,7 @@ class ProcessPipelineWorker
sidekiq_options queue: :default
def perform(pipeline_id)
Ci::Pipeline.find_by(id: pipeline_id).try do |pipeline|
pipeline.process!
end
Ci::Pipeline.find_by(id: pipeline_id)
.try(:process!)
end
end
......@@ -4,8 +4,7 @@ class UpdatePipelineWorker
sidekiq_options queue: :default
def perform(pipeline_id)
Ci::Pipeline.find_by(id: pipeline_id).try do |pipeline|
pipeline.update_status
end
Ci::Pipeline.find_by(id: pipeline_id)
.try(:update_status)
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