Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-26 21:09:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-26 21:09:45 +0300
commite7e40d45b066139707b3b851c6004e075da5226b (patch)
treecc99f48e2aaedbe9e8dac53fa4ca8d8f6f270bb4 /app/models/commit_status.rb
parentaad3ac9e5e59d47e389ff387e9fc2ae3a008de33 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index e989129209a..f22db14a295 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -214,8 +214,14 @@ class CommitStatus < ApplicationRecord
allow_failure? && (failed? || canceled?)
end
+ # Time spent running.
def duration
- calculate_duration
+ calculate_duration(started_at, finished_at)
+ end
+
+ # Time spent in the pending state.
+ def queued_duration
+ calculate_duration(queued_at, started_at)
end
def latest?