Commit 6f7e676a authored by Sean McGivern's avatar Sean McGivern

Fix sysvinit Sidekiq logging

Now that `bin/background_jobs` always logs to both standard output and
`log/sidekiq.log`, we are spamming sysvinit users because our init
script does not suppress the Sidekiq process's standard output.

We can just use `>` to redirect here because `bin/background_jobs`
already redirects standard error to standard output.

Changelog: fixed
parent b46673c8
......@@ -291,7 +291,9 @@ start_gitlab() {
if [ "$sidekiq_status" = "0" ]; then
echo "The Sidekiq job dispatcher is already running with pid $spid, not restarting"
else
RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs start &
# bin/background_jobs writes to log/sidekiq.log and stdout by
# default, so we just need to suppress the latter here.
RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs start > /dev/null &
fi
if [ "$gitlab_workhorse_status" = "0" ]; then
......@@ -454,7 +456,9 @@ reload_gitlab(){
echo "Done."
echo "Restarting GitLab Sidekiq since it isn't capable of reloading its config..."
RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs restart
# bin/background_jobs writes to log/sidekiq.log and stdout by default,
# so we just need to suppress the latter here.
RAILS_ENV=$RAILS_ENV SIDEKIQ_WORKERS=$SIDEKIQ_WORKERS bin/background_jobs restart > /dev/null &
if [ "$mail_room_enabled" != true ]; then
echo "Restarting GitLab MailRoom since it isn't capable of reloading its config..."
......
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