Skip to content
Snippets Groups Projects
Commit 7f270d04 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Do not return false in commit status transition

parent 4e4640b1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment