diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-09-27 13:44:03 +0200 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-10-02 17:08:13 +0200 |
commit | ea38e832f0f197c5121504d7e193227d3d9c7867 (patch) | |
tree | 83450ab82d52b00fa674a9b95e7724e9967e0972 /lib | |
parent | f976418d128e9f00d6bc6e7eb2862e553e82934c (diff) | |
download | gitlab-ce-ea38e832f0f197c5121504d7e193227d3d9c7867.tar.gz |
Allow remaining time of scheduled jobs to overflow one day
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/status/build/scheduled.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/ci/status/build/scheduled.rb b/lib/gitlab/ci/status/build/scheduled.rb index 493c71718a2..eebb3f761c5 100644 --- a/lib/gitlab/ci/status/build/scheduled.rb +++ b/lib/gitlab/ci/status/build/scheduled.rb @@ -25,9 +25,11 @@ module Gitlab private + include TimeHelper + def execute_in - diff = [0, subject.scheduled_at - Time.now].max - Time.at(diff).utc.strftime("%H:%M:%S") + remaining_seconds = [0, subject.scheduled_at - Time.now].max + duration_in_numbers(remaining_seconds, true) end end end |