diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-08-29 23:37:15 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-08-29 23:37:15 +0800 |
commit | f6051d71d62dd5b98daad44422867345685ed427 (patch) | |
tree | d3a5f6b565b1d98efe08dacd9a7477444e2ac530 | |
parent | e5d022c813d476383cc9889f8631d38ac8a85f62 (diff) | |
download | gitlab-ce-f6051d71d62dd5b98daad44422867345685ed427.tar.gz |
no point to set duration while not started yet
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 9db0f139162..9799c06c19f 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -258,6 +258,8 @@ module Ci end def update_duration + return unless started_at + calculated_status = %w[success failed running canceled] calculated_builds = builds.latest.where(status: calculated_status) calculator = Gitlab::Ci::PipelineDuration.from_builds(calculated_builds) |