summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-02-28 17:06:28 +0000
committerNick Thomas <nick@gitlab.com>2019-02-28 21:58:31 +0000
commit9e783be668d09d6a5688490c74213710ed5f056a (patch)
treea611b9335ba7422b4aeea108b5bd41937f2365cd /bin
parent7d1216016cfc64e35955249e39c46615e2dbdf93 (diff)
downloadgitlab-ce-9e783be668d09d6a5688490c74213710ed5f056a.tar.gz
bin/background_jobs: use pgroups
Diffstat (limited to 'bin')
-rwxr-xr-xbin/background_jobs9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/background_jobs b/bin/background_jobs
index f28e2f722dc..9d12422b81a 100755
--- a/bin/background_jobs
+++ b/bin/background_jobs
@@ -38,7 +38,14 @@ start_no_deamonize()
start_sidekiq()
{
- exec bundle exec sidekiq -C "${sidekiq_config}" -e $RAILS_ENV -P $sidekiq_pidfile "$@"
+ cmd="exec"
+ chpst=$(which chpst)
+
+ if [ -n "$chpst" ]; then
+ cmd="${cmd} ${chpst} -P"
+ fi
+
+ ${cmd} bundle exec sidekiq -C "${sidekiq_config}" -e $RAILS_ENV -P $sidekiq_pidfile "$@"
}
load_ok()