summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-20 14:53:08 +0000
committerRémy Coutable <remy@rymai.me>2016-10-20 14:53:08 +0000
commit3c5b94740b7b0193cfd0929484f60f321b3bf0b6 (patch)
treed9d86f32e4ed266ffba909160d71a6204ec01e07
parentb101e92bde99098bff6ff05d9bd190fe77f1d1af (diff)
parentc9108442b5ac33514801c38412bed5e7b13677b8 (diff)
downloadgitlab-ce-3c5b94740b7b0193cfd0929484f60f321b3bf0b6.tar.gz
Merge branch 'update-duration-at-the-end-of-pipeline' into 'master'
Update duration at the end of pipeline ## What does this MR do? Moves duration calculation to be done only once at the end of pipeline processing. Currently this is done every one build. ## Why was this MR needed? This is the simplest thing that we can do before properly implementing duration calculation: https://gitlab.com/gitlab-org/gitlab-ce/issues/23523#note_17145614 This is ~Performance improvement that significantly affects: http://performance.gitlab.net/dashboard/db/sidekiq-workers?var-worker=PipelineUpdateWorker%23perform&var-database=Production&from=now-1h&to=now See merge request !6987
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/models/ci/pipeline.rb3
2 files changed, 1 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0bfdf23b959..de24e08c52f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,7 @@ Please view this file on the master branch, on stable branches it's out of date.
- Add `/projects/visible` API endpoint (Ben Boeckel)
- Fix centering of custom header logos (Ashley Dumaine)
- Keep around commits only pipeline creation as pipeline data doesn't change over time
+ - Update duration at the end of pipeline
- ExpireBuildArtifactsWorker query builds table without ordering enqueuing one job per build to cleanup
- Add group level labels. (!6425)
- Add an example for testing a phoenix application with Gitlab CI in the docs (Manthan Mallikarjun)
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index e84c91b417d..d5c1e03b461 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -59,9 +59,6 @@ module Ci
before_transition any => [:success, :failed, :canceled] do |pipeline|
pipeline.finished_at = Time.now
- end
-
- before_transition do |pipeline|
pipeline.update_duration
end