diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-08-29 23:40:15 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-08-29 23:40:15 +0800 |
commit | e9e7c3788d1b2061e321032db4c72178f21ca6bd (patch) | |
tree | 2ed5770908508d3ef74807a62c1143e0dce198da /lib | |
parent | f6051d71d62dd5b98daad44422867345685ed427 (diff) | |
download | gitlab-ce-e9e7c3788d1b2061e321032db4c72178f21ca6bd.tar.gz |
no builds no pending
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/pipeline_duration.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/ci/pipeline_duration.rb b/lib/gitlab/ci/pipeline_duration.rb index e4c0be3b640..b9d0006182e 100644 --- a/lib/gitlab/ci/pipeline_duration.rb +++ b/lib/gitlab/ci/pipeline_duration.rb @@ -82,6 +82,8 @@ module Gitlab end def process_pending_duration(segments, duration) + return 0 if segments.empty? + total = segments.last.last - segments.first.first total - duration end |