BigW Consortium Gitlab

Commit d3450ad2 by Dmitriy Zaporozhets

Merge branch 'improve_sidekiq_check' of /home/git/repositories/gitlab/gitlabhq

parents 0223597a 4017789f
...@@ -289,7 +289,6 @@ namespace :gitlab do ...@@ -289,7 +289,6 @@ namespace :gitlab do
######################## ########################
def check_gitlab_git_config def check_gitlab_git_config
gitlab_user = Gitlab.config.gitlab.user
print "Git configured for #{gitlab_user} user? ... " print "Git configured for #{gitlab_user} user? ... "
options = { options = {
...@@ -664,8 +663,8 @@ namespace :gitlab do ...@@ -664,8 +663,8 @@ namespace :gitlab do
puts "#{sidekiq_match.length}".red puts "#{sidekiq_match.length}".red
try_fixing_it( try_fixing_it(
'sudo service gitlab stop', 'sudo service gitlab stop',
'sudo pkill -f sidekiq', "sudo pkill -u #{gitlab_user} -f sidekiq",
'sleep 10 && sudo pkill -9 -f sidekiq', "sleep 10 && sudo pkill -9 -u #{gitlab_user} -f sidekiq",
'sudo service gitlab start' 'sudo service gitlab start'
) )
fix_and_rerun fix_and_rerun
...@@ -709,10 +708,13 @@ namespace :gitlab do ...@@ -709,10 +708,13 @@ namespace :gitlab do
end end
def sudo_gitlab(command) def sudo_gitlab(command)
gitlab_user = Gitlab.config.gitlab.user
"sudo -u #{gitlab_user} -H #{command}" "sudo -u #{gitlab_user} -H #{command}"
end end
def gitlab_user
Gitlab.config.gitlab.user
end
def start_checking(component) def start_checking(component)
puts "Checking #{component.yellow} ..." puts "Checking #{component.yellow} ..."
puts "" puts ""
......
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