From a29fbc213ca192af9994f61b67990172b9640855 Mon Sep 17 00:00:00 2001 From: wendy0402 Date: Sun, 19 Feb 2017 15:15:30 +0700 Subject: fix incorrect sidekiq concurrency count in admin background page --- app/controllers/admin/background_jobs_controller.rb | 1 + app/views/admin/background_jobs/show.html.haml | 2 +- ...dekiq_concurrency_warning_message_in_admin_background_job_page.yml | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/fix_sidekiq_concurrency_warning_message_in_admin_background_job_page.yml diff --git a/app/controllers/admin/background_jobs_controller.rb b/app/controllers/admin/background_jobs_controller.rb index 338496013a0..c09095b9849 100644 --- a/app/controllers/admin/background_jobs_controller.rb +++ b/app/controllers/admin/background_jobs_controller.rb @@ -2,5 +2,6 @@ class Admin::BackgroundJobsController < Admin::ApplicationController def show ps_output, _ = Gitlab::Popen.popen(%W(ps -U #{Gitlab.config.gitlab.user} -o pid,pcpu,pmem,stat,start,command)) @sidekiq_processes = ps_output.split("\n").grep(/sidekiq/) + @concurrency = Sidekiq.options[:concurrency] end end diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml index 4f982a6e369..9f2717cf0e8 100644 --- a/app/views/admin/background_jobs/show.html.haml +++ b/app/views/admin/background_jobs/show.html.haml @@ -35,7 +35,7 @@ .clearfix %p %i.fa.fa-exclamation-circle - If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'. + = "If '[#{@concurrency} of #{@concurrency} busy]' is shown, restart GitLab with 'sudo service gitlab reload'." %p %i.fa.fa-exclamation-circle If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u #{gitlab_config.user} -f sidekiq) and restart GitLab. diff --git a/changelogs/unreleased/fix_sidekiq_concurrency_warning_message_in_admin_background_job_page.yml b/changelogs/unreleased/fix_sidekiq_concurrency_warning_message_in_admin_background_job_page.yml new file mode 100644 index 00000000000..e09d03bb608 --- /dev/null +++ b/changelogs/unreleased/fix_sidekiq_concurrency_warning_message_in_admin_background_job_page.yml @@ -0,0 +1,4 @@ +--- +title: fix incorrect sidekiq concurrency count in admin background page +merge_request: +author: wendy0402 -- cgit v1.2.1