Commit 898d09a2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Gitlab_meta to 3.1. Added workaround for 500 Redis error until it will be fixed

parent d18e2bd5
...@@ -152,5 +152,5 @@ group :test do ...@@ -152,5 +152,5 @@ group :test do
end end
group :production do group :production do
gem "gitlab_meta", '3.0' gem "gitlab_meta", '3.1'
end end
...@@ -171,7 +171,7 @@ GEM ...@@ -171,7 +171,7 @@ GEM
mime-types (~> 1.19) mime-types (~> 1.19)
pygments.rb (>= 0.2.13) pygments.rb (>= 0.2.13)
github-markup (0.7.4) github-markup (0.7.4)
gitlab_meta (3.0) gitlab_meta (3.1)
gitolite (1.1.0) gitolite (1.1.0)
gratr19 (~> 0.4.4.1) gratr19 (~> 0.4.4.1)
grit (~> 2.5.0) grit (~> 2.5.0)
...@@ -465,7 +465,7 @@ DEPENDENCIES ...@@ -465,7 +465,7 @@ DEPENDENCIES
git git
github-linguist (~> 2.3.4) github-linguist (~> 2.3.4)
github-markup (~> 0.7.4) github-markup (~> 0.7.4)
gitlab_meta (= 3.0) gitlab_meta (= 3.1)
gitolite (= 1.1.0) gitolite (= 1.1.0)
grack! grack!
grape (~> 0.2.1) grape (~> 0.2.1)
......
class Admin::DashboardController < AdminController class Admin::DashboardController < AdminController
def index def index
@workers = Resque.workers
@pending_jobs = Resque.size(:post_receive)
@projects = Project.order("created_at DESC").limit(10) @projects = Project.order("created_at DESC").limit(10)
@users = User.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
end end
...@@ -4,13 +4,21 @@ ...@@ -4,13 +4,21 @@
%h5 %h5
Resque Workers Resque Workers
.data.padded .data.padded
= link_to admin_resque_path do - if @resque_accessible
%h1{class: @workers.present? ? "cgreen" : "cred"} = link_to admin_resque_path do
= @workers.count %h1{class: @workers.present? ? "cgreen" : "cred"}
%hr = @workers.count
%p %hr
%strong{class: @pending_jobs > 0 ? "cred" : "cgreen"} %p
#{@pending_jobs} post receive jobs waiting %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 .span4
.ui-box .ui-box
...@@ -42,6 +50,6 @@ ...@@ -42,6 +50,6 @@
%hr %hr
- @users.each do |user| - @users.each do |user|
%p %p
= link_to [:admin, user] do = link_to [:admin, user] do
= user.name = user.name
%small= user.email %small= user.email
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment