summaryrefslogtreecommitdiff
path: root/app
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 /app
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
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/pipeline.rb3
1 files changed, 0 insertions, 3 deletions
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