diff options
author | Nick Thomas <nick@gitlab.com> | 2019-02-28 20:06:28 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-03-01 00:58:31 +0300 |
commit | 9e783be668d09d6a5688490c74213710ed5f056a (patch) | |
tree | a611b9335ba7422b4aeea108b5bd41937f2365cd /bin | |
parent | 7d1216016cfc64e35955249e39c46615e2dbdf93 (diff) |
bin/background_jobs: use pgroups
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/background_jobs | 9 |
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() |