diff options
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" |