diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /bin/background_jobs | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) | |
download | gitlab-ce-d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb.tar.gz |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'bin/background_jobs')
-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" |