Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
13e073e4
Commit
13e073e4
authored
Sep 27, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'only_one_sidekiq' of /home/git/repositories/gitlab/gitlabhq
parents
052a7cc9
1a9b0df7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+26
-1
No files found.
lib/tasks/gitlab/check.rake
View file @
13e073e4
...
@@ -626,6 +626,7 @@ namespace :gitlab do
...
@@ -626,6 +626,7 @@ namespace :gitlab do
start_checking
"Sidekiq"
start_checking
"Sidekiq"
check_sidekiq_running
check_sidekiq_running
only_one_sidekiq_running
finished_checking
"Sidekiq"
finished_checking
"Sidekiq"
end
end
...
@@ -637,7 +638,7 @@ namespace :gitlab do
...
@@ -637,7 +638,7 @@ namespace :gitlab do
def
check_sidekiq_running
def
check_sidekiq_running
print
"Running? ... "
print
"Running? ... "
if
run_and_match
(
"ps aux | grep -i sidekiq"
,
/sidekiq \d+\.\d+\.\d+.+$/
)
if
sidekiq_process_match
puts
"yes"
.
green
puts
"yes"
.
green
else
else
puts
"no"
.
red
puts
"no"
.
red
...
@@ -651,6 +652,30 @@ namespace :gitlab do
...
@@ -651,6 +652,30 @@ namespace :gitlab do
fix_and_rerun
fix_and_rerun
end
end
end
end
def
only_one_sidekiq_running
sidekiq_match
=
sidekiq_process_match
return
unless
sidekiq_match
print
'Number of Sidekiq processes ... '
if
sidekiq_match
.
length
==
1
puts
'1'
.
green
else
puts
"
#{
sidekiq_match
.
length
}
"
.
red
try_fixing_it
(
'Unless you are running another Rails application on this server there should only be one Sidekiq process.'
,
'sudo service gitlab stop'
,
'sudo pkill -f sidekiq'
,
'sleep 10 && sudo pkill -9 -f sidekiq'
,
'sudo service gitlab start'
)
fix_and_rerun
end
end
def
sidekiq_process_match
run_and_match
(
"ps aux | grep -i sidekiq"
,
/(sidekiq \d+\.\d+\.\d+.+$)/
)
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment