summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-09-25 18:44:08 +0900
committerAlessio Caiazza <acaiazza@gitlab.com>2018-10-02 17:04:04 +0200
commitb1d24c0d14afdf3312e8f0745cc5ba87e41004b4 (patch)
treef66203c9092fdac45e9104d299bd81a51ee8668f /lib
parentc9077a0efdca065f848e3698c3afd5251a135049 (diff)
downloadgitlab-ce-b1d24c0d14afdf3312e8f0745cc5ba87e41004b4.tar.gz
Fix stuck job worker. Fix sidekiq queue namespace
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/status/build/scheduled.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/ci/status/build/scheduled.rb b/lib/gitlab/ci/status/build/scheduled.rb
index 270a2706c87..c6713f0d633 100644
--- a/lib/gitlab/ci/status/build/scheduled.rb
+++ b/lib/gitlab/ci/status/build/scheduled.rb
@@ -23,7 +23,8 @@ module Gitlab
private
def execute_in
- Time.at(subject.scheduled_at).utc.strftime("%H:%M:%S")
+ diff = [0, subject.scheduled_at - Time.now].max
+ Time.at(diff).utc.strftime("%H:%M:%S")
end
end
end