summaryrefslogtreecommitdiff
path: root/app/presenters/ci/build_presenter.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-09-24 20:02:26 +0900
committerAlessio Caiazza <acaiazza@gitlab.com>2018-10-02 17:04:04 +0200
commit703a41f8862c7278559ff13f2aa4f39ffd660c4e (patch)
treef408d57fbb5caaac94ff41b7e942f07c22b6841c /app/presenters/ci/build_presenter.rb
parentf97ec4b8f44152036a8f8242bcf1584cfbd56cec (diff)
downloadgitlab-ce-703a41f8862c7278559ff13f2aa4f39ffd660c4e.tar.gz
Introduce enqueue_scheduled event
Diffstat (limited to 'app/presenters/ci/build_presenter.rb')
-rw-r--r--app/presenters/ci/build_presenter.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/presenters/ci/build_presenter.rb b/app/presenters/ci/build_presenter.rb
index 5331cdf632b..4005840ce58 100644
--- a/app/presenters/ci/build_presenter.rb
+++ b/app/presenters/ci/build_presenter.rb
@@ -35,6 +35,10 @@ module Ci
"#{subject.name} - #{detailed_status.status_tooltip}"
end
+ def execute_in
+ [0, scheduled_at - Time.now].max
+ end
+
private
def tooltip_for_badge