We don't have to touch it because builds would touch pipeline anyway

This commit is contained in:
Lin Jen-Shin 2016-08-03 23:06:28 +08:00
parent db123d29e7
commit 3691a39152
2 changed files with 0 additions and 11 deletions

View file

@ -27,7 +27,6 @@ module Ci
end end
pipeline.save! pipeline.save!
pipeline.touch
unless pipeline.create_builds(current_user) unless pipeline.create_builds(current_user)
pipeline.errors.add(:base, 'No builds for this pipeline.') pipeline.errors.add(:base, 'No builds for this pipeline.')

View file

@ -53,17 +53,7 @@ class CreateCommitBuildsService
return false return false
end end
save_pipeline!
end
private
##
# Create a new pipeline and touch object to calculate status
#
def save_pipeline!
@pipeline.save! @pipeline.save!
@pipeline.touch
@pipeline @pipeline
end end
end end