Commit 39c66c82 authored by Ciro Santilli's avatar Ciro Santilli

Use Gitlab.config instead of Settings everywhere

parent a0a826eb
class Admin::BackgroundJobsController < Admin::ApplicationController class Admin::BackgroundJobsController < Admin::ApplicationController
def show def show
ps_output, _ = Gitlab::Popen.popen(%W(ps -U #{Settings.gitlab.user} -o pid,pcpu,pmem,stat,start,command)) 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/) @sidekiq_processes = ps_output.split("\n").grep(/sidekiq/)
end end
end end
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
- next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/) - next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
- data = process.strip.split(' ') - data = process.strip.split(' ')
%tr %tr
%td= Settings.gitlab.user %td= gitlab_config.user
- 5.times do - 5.times do
%td= data.shift %td= data.shift
%td= data.join(' ') %td= data.join(' ')
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'. If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'.
%p %p
%i.fa.fa-exclamation-circle %i.fa.fa-exclamation-circle
If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u #{Settings.gitlab.user} -f sidekiq) and restart GitLab. 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.
......
...@@ -19,7 +19,7 @@ module Gitlab ...@@ -19,7 +19,7 @@ module Gitlab
issue = Issue.find(id) issue = Issue.find(id)
project_issue_url(id: issue.iid, project_issue_url(id: issue.iid,
project_id: issue.project, project_id: issue.project,
host: Settings.gitlab['url']) host: Gitlab.config.gitlab['url'])
end end
end end
end end
...@@ -7,9 +7,9 @@ namespace :gitlab do ...@@ -7,9 +7,9 @@ namespace :gitlab do
default_version = File.read(File.join(Rails.root, "GITLAB_SHELL_VERSION")).strip default_version = File.read(File.join(Rails.root, "GITLAB_SHELL_VERSION")).strip
args.with_defaults(tag: 'v' + default_version, repo: "https://gitlab.com/gitlab-org/gitlab-shell.git") args.with_defaults(tag: 'v' + default_version, repo: "https://gitlab.com/gitlab-org/gitlab-shell.git")
user = Settings.gitlab.user user = Gitlab.config.gitlab.user
home_dir = Rails.env.test? ? Rails.root.join('tmp/tests') : Settings.gitlab.user_home home_dir = Rails.env.test? ? Rails.root.join('tmp/tests') : Gitlab.config.gitlab.user_home
gitlab_url = Settings.gitlab.url gitlab_url = Gitlab.config.gitlab.url
# gitlab-shell requires a / at the end of the url # gitlab-shell requires a / at the end of the url
gitlab_url += "/" unless gitlab_url.match(/\/$/) gitlab_url += "/" unless gitlab_url.match(/\/$/)
repos_path = Gitlab.config.gitlab_shell.repos_path repos_path = Gitlab.config.gitlab_shell.repos_path
......
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