diff options
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index e989129209a..c5ba19438cd 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? @@ -286,4 +292,4 @@ class CommitStatus < ApplicationRecord end end -CommitStatus.prepend_if_ee('::EE::CommitStatus') +CommitStatus.prepend_mod_with('CommitStatus') |