diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-12 21:12:31 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-14 17:29:18 +0200 |
commit | 7af4f5215e28927830cbc74d383cdfeb9e4ef587 (patch) | |
tree | 1a318a590e96153ebb1a843538dd70279e098c2a /app/controllers/ci | |
parent | 2d0fcb4de23ab368e2e030b3cf7f6b1705ef676f (diff) | |
download | gitlab-ce-7af4f5215e28927830cbc74d383cdfeb9e4ef587.tar.gz |
Show warning if build doesn't have runners with specified tags or runners didn't connect recently
Slightly refactor runner status detection: moving it to Runner class
Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
Diffstat (limited to 'app/controllers/ci')
-rw-r--r-- | app/controllers/ci/admin/runners_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/ci/admin/runners_controller.rb b/app/controllers/ci/admin/runners_controller.rb index 9a68add9083..110954a612d 100644 --- a/app/controllers/ci/admin/runners_controller.rb +++ b/app/controllers/ci/admin/runners_controller.rb @@ -6,7 +6,7 @@ module Ci @runners = Ci::Runner.order('id DESC') @runners = @runners.search(params[:search]) if params[:search].present? @runners = @runners.page(params[:page]).per(30) - @active_runners_cnt = Ci::Runner.where("contacted_at > ?", 1.minutes.ago).count + @active_runners_cnt = Ci::Runner.online.count end def show @@ -66,7 +66,7 @@ module Ci end def runner_params - params.require(:runner).permit(:token, :description, :tag_list, :contacted_at, :active) + params.require(:runner).permit(:token, :description, :tag_list, :active) end end end |