diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-26 21:09:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-26 21:09:45 +0300 |
commit | e7e40d45b066139707b3b851c6004e075da5226b (patch) | |
tree | cc99f48e2aaedbe9e8dac53fa4ca8d8f6f270bb4 /app/models/commit_status.rb | |
parent | aad3ac9e5e59d47e389ff387e9fc2ae3a008de33 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 8 |
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? |