no point to set duration while not started yet

This commit is contained in:
Lin Jen-Shin 2016-08-29 23:37:15 +08:00
parent e5d022c813
commit f6051d71d6

View file

@ -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)