diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-11 15:11:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-11 15:11:56 +0300 |
commit | cb787abec6e64a220b2807469023f4de210dac10 (patch) | |
tree | 4f9a8a03a0c9ca91efd08e5baa74859d24e7e2e9 /bin | |
parent | 31a9181ed65e80ceac2cbd6e2dba9af40e7b0d0b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/background_jobs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/background_jobs b/bin/background_jobs index 6aebc8126c6..f9b42b97e06 100755 --- a/bin/background_jobs +++ b/bin/background_jobs @@ -3,6 +3,7 @@ cd $(dirname $0)/.. app_root=$(pwd) sidekiq_workers=${SIDEKIQ_WORKERS:-1} +sidekiq_queues=${SIDEKIQ_QUEUES:-*} # Queues to listen to; default to `*` (all) sidekiq_pidfile="$app_root/tmp/pids/sidekiq-cluster.pid" sidekiq_logfile="$app_root/log/sidekiq.log" gitlab_user=$(ls -l config.ru | awk '{print $3}') @@ -37,8 +38,7 @@ restart() stop fi - warn "Sidekiq output will be written to $sidekiq_logfile" - start_sidekiq "$@" >> $sidekiq_logfile 2>&1 + start_sidekiq "$@" } start_sidekiq() @@ -50,13 +50,13 @@ start_sidekiq() cmd="${cmd} ${chpst} -P" fi - # sidekiq-cluster expects '*' '*' arguments (one wildcard for each process). + # sidekiq-cluster expects an argument per process. for (( i=1; i<=$sidekiq_workers; i++ )) do - processes_args+=("*") + processes_args+=("${sidekiq_queues}") done - ${cmd} bin/sidekiq-cluster "${processes_args[@]}" -P $sidekiq_pidfile -e $RAILS_ENV "$@" + ${cmd} bin/sidekiq-cluster "${processes_args[@]}" -P $sidekiq_pidfile -e $RAILS_ENV "$@" 2>&1 | tee -a $sidekiq_logfile } action="$1" |