Commit 85cb6e69 authored by Sean McGivern's avatar Sean McGivern

Write output of bin/background_jobs to stdout and log file

bin/background_jobs would write to stdout with `start_foreground`, and
to log/sidekiq.log with `start` or `restart`. That was confusing, as
other application log files are in log/ in development. To simplify
this, use `tee` to make `start_foreground` both write to stdout and
log/sidekiq.log.
parent 0c75f212
......@@ -38,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()
......@@ -57,7 +56,7 @@ start_sidekiq()
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"
......
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