summaryrefslogtreecommitdiff
path: root/app/models/ci/pipeline.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-15 18:54:38 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-08-15 18:54:38 +0800
commit5e7d99d3dc3cc7c5cf644f15610ed9813b45cb41 (patch)
tree4a8fbf1f654be5cd0dafdeeac033d1e54643283a /app/models/ci/pipeline.rb
parent7d9bdac6cef6c2e59c8d8753cd54bf5516bfdefc (diff)
downloadgitlab-ce-5e7d99d3dc3cc7c5cf644f15610ed9813b45cb41.tar.gz
Rename to total_duration and we're not using CommitStatus.duration
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r--app/models/ci/pipeline.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index a57ae0085ca..19335ccea57 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -78,7 +78,7 @@ module Ci
CommitStatus.where(pipeline: pluck(:id)).stages
end
- def self.duration
+ def self.total_duration
where.not(duration: nil).sum(:duration)
end