Commit f6051d71 authored by Lin Jen-Shin's avatar Lin Jen-Shin

no point to set duration while not started yet

parent e5d022c8
...@@ -258,6 +258,8 @@ module Ci ...@@ -258,6 +258,8 @@ module Ci
end end
def update_duration def update_duration
return unless started_at
calculated_status = %w[success failed running canceled] calculated_status = %w[success failed running canceled]
calculated_builds = builds.latest.where(status: calculated_status) calculated_builds = builds.latest.where(status: calculated_status)
calculator = Gitlab::Ci::PipelineDuration.from_builds(calculated_builds) calculator = Gitlab::Ci::PipelineDuration.from_builds(calculated_builds)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment