#!/bin/sh

cd <%= node['gitlab'][@options[:rails_app]]['dir'] %>/working

exec 2>&1
<%= render("mount_point_check.erb") %>
exec chpst -e /opt/gitlab/etc/<%= @options[:rails_app] %>/env -P \
  -U <%= @options[:user] %> -u <%= @options[:user] %> \
  /opt/gitlab/embedded/bin/bundle exec sidekiq \
    -q post_receive \
    -q mailers \
    -q archive_repo \
    -q system_hook \
    -q project_web_hook \
    -q gitlab_shell \
    -q incoming_email \
    -q common \
    -q pages \
    -q elasticsearch \
    -q default \
    -e <%= node['gitlab'][@options[:rails_app]]['environment'] %> \
    -r /opt/gitlab/embedded/service/<%= @options[:rails_app] %> \
    -t <%= @options[:shutdown_timeout] %> \
    -c <%= @options[:concurrency] %>

#!/bin/sh

cd <%= node['gitlab'][@options[:rails_app]]['dir'] %>/working

exec 2>&1
<%= render("mount_point_check.erb") %>
exec chpst -e /opt/gitlab/etc/<%= @options[:rails_app] %>/env -P \
  -U <%= @options[:user] %> -u <%= @options[:user] %> \
  /opt/gitlab/embedded/bin/bundle exec sidekiq \
    -C /opt/gitlab/embedded/service/<%= @options[:rails_app] %>/config/sidekiq_queues.yml \
    -e <%= node['gitlab'][@options[:rails_app]]['environment'] %> \
    -r /opt/gitlab/embedded/service/<%= @options[:rails_app] %> \
    -t <%= @options[:shutdown_timeout] %> \
    -c <%= @options[:concurrency] %>

Use a configuration file for Sidekiq
Use a configuration file for Sidekiq

This removes the need for specifying all the queues manually. This
depends on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7006.
