Commit b34ec573 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'ashmckenzie/ensure-args-are-passed-to-sidekiq' into 'master'

Ensure any args are passed onto sidekiq

See merge request gitlab-org/gitlab!65393
parents 560f42f5 08a6d18b
......@@ -24,13 +24,13 @@ restart()
fi
pkill -u $gitlab_user -f 'sidekiq [0-9]'
start_sidekiq -P $sidekiq_pidfile -d -L $sidekiq_logfile >> $sidekiq_logfile 2>&1
start_sidekiq -P $sidekiq_pidfile -d -L $sidekiq_logfile "$@" >> $sidekiq_logfile 2>&1
}
# Starts on foreground but output to the logfile instead stdout.
start_silent()
{
start_sidekiq >> $sidekiq_logfile 2>&1
start_sidekiq "$@" >> $sidekiq_logfile 2>&1
}
start_sidekiq()
......@@ -50,17 +50,17 @@ case "$1" in
stop
;;
start)
restart
restart "$@"
;;
start_silent)
warn "Deprecated: Will be removed at 13.0 (see https://gitlab.com/gitlab-org/gitlab/-/issues/196731)."
start_silent
;;
start_foreground)
start_sidekiq
start_sidekiq "$@"
;;
restart)
restart
restart "$@"
;;
*)
echo "Usage: RAILS_ENV=<env> $0 {stop|start|start_silent|start_foreground|restart}"
......
......@@ -37,7 +37,7 @@ restart()
fi
warn "Sidekiq output will be written to $sidekiq_logfile"
start_sidekiq >> $sidekiq_logfile 2>&1
start_sidekiq "$@" >> $sidekiq_logfile 2>&1
}
start_sidekiq()
......@@ -55,7 +55,7 @@ start_sidekiq()
processes_args+=("*")
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 "$@"
}
case "$1" in
......@@ -63,13 +63,13 @@ case "$1" in
stop
;;
start)
restart &
restart "$@" &
;;
start_foreground)
start_sidekiq
start_sidekiq "$@"
;;
restart)
restart &
restart "$@" &
;;
*)
echo "Usage: RAILS_ENV=<env> SIDEKIQ_WORKERS=<n> $0 {stop|start|start_foreground|restart}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment