From 3691a391524911a21d5af1c75cb4cd16a8a6e475 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 3 Aug 2016 23:06:28 +0800 Subject: [PATCH] We don't have to touch it because builds would touch pipeline anyway --- app/services/ci/create_pipeline_service.rb | 1 - app/services/create_commit_builds_service.rb | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb index 7a8b0683acb..be91bf0db85 100644 --- a/app/services/ci/create_pipeline_service.rb +++ b/app/services/ci/create_pipeline_service.rb @@ -27,7 +27,6 @@ module Ci end pipeline.save! - pipeline.touch unless pipeline.create_builds(current_user) pipeline.errors.add(:base, 'No builds for this pipeline.') diff --git a/app/services/create_commit_builds_service.rb b/app/services/create_commit_builds_service.rb index 0b66b854dea..5e77768abe7 100644 --- a/app/services/create_commit_builds_service.rb +++ b/app/services/create_commit_builds_service.rb @@ -53,17 +53,7 @@ class CreateCommitBuildsService return false end - save_pipeline! - end - - private - - ## - # Create a new pipeline and touch object to calculate status - # - def save_pipeline! @pipeline.save! - @pipeline.touch @pipeline end end