Gitlab_meta to 3.1. Added workaround for 500 Redis error until it will be fixed
This commit is contained in:
parent
d18e2bd59d
commit
898d09a21e
4 changed files with 26 additions and 13 deletions
|
@ -1,8 +1,13 @@
|
|||
class Admin::DashboardController < AdminController
|
||||
def index
|
||||
@workers = Resque.workers
|
||||
@pending_jobs = Resque.size(:post_receive)
|
||||
@projects = Project.order("created_at DESC").limit(10)
|
||||
@users = User.order("created_at DESC").limit(10)
|
||||
|
||||
@resque_accessible = true
|
||||
@workers = Resque.workers
|
||||
@pending_jobs = Resque.size(:post_receive)
|
||||
|
||||
rescue Redis::InheritedError
|
||||
@resque_accessible = false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,13 +4,21 @@
|
|||
%h5
|
||||
Resque Workers
|
||||
.data.padded
|
||||
= link_to admin_resque_path do
|
||||
%h1{class: @workers.present? ? "cgreen" : "cred"}
|
||||
= @workers.count
|
||||
%hr
|
||||
%p
|
||||
%strong{class: @pending_jobs > 0 ? "cred" : "cgreen"}
|
||||
#{@pending_jobs} post receive jobs waiting
|
||||
- if @resque_accessible
|
||||
= link_to admin_resque_path do
|
||||
%h1{class: @workers.present? ? "cgreen" : "cred"}
|
||||
= @workers.count
|
||||
%hr
|
||||
%p
|
||||
%strong{class: @pending_jobs > 0 ? "cred" : "cgreen"}
|
||||
#{@pending_jobs} post receive jobs waiting
|
||||
- else
|
||||
= link_to admin_resque_path do
|
||||
%h1.cdark ?
|
||||
%hr
|
||||
%p
|
||||
%strong Resque status unknown
|
||||
|
||||
|
||||
.span4
|
||||
.ui-box
|
||||
|
@ -42,6 +50,6 @@
|
|||
%hr
|
||||
- @users.each do |user|
|
||||
%p
|
||||
= link_to [:admin, user] do
|
||||
= link_to [:admin, user] do
|
||||
= user.name
|
||||
%small= user.email
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue