Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-10-04 17:34:22 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-10-04 17:34:22 +0300
commit7f270d041da55e1fd5c378dcf2291ba752a9114d (patch)
treedd90db722af2b7f0c30ac069e092870f2953ec09 /app/workers
parent4e4640b10bfae9bfa1da265775ede57ea72c358c (diff)
Do not return false in commit status transition
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/process_pipeline_worker.rb5
-rw-r--r--app/workers/update_pipeline_worker.rb5
2 files changed, 4 insertions, 6 deletions
diff --git a/app/workers/process_pipeline_worker.rb b/app/workers/process_pipeline_worker.rb
index 189cfa207ff..26ea5f1c24d 100644
--- a/app/workers/process_pipeline_worker.rb
+++ b/app/workers/process_pipeline_worker.rb
@@ -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
diff --git a/app/workers/update_pipeline_worker.rb b/app/workers/update_pipeline_worker.rb
index 9fd622a0970..6ef5678073e 100644
--- a/app/workers/update_pipeline_worker.rb
+++ b/app/workers/update_pipeline_worker.rb
@@ -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