Improve bin/background_jobs script
This contains two commits:
-
Allow specifying queues for bin/background_jobs
If you set the
SIDEKIQ_QUEUES
environment variable, bin/background_jobs will use that queue list rather than the default ('*'; all queues).This is needed for gitlab-com/gl-infra/scalability#1281 (closed).
-
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 withstart
orrestart
. That was confusing, as other application log files are in log/ in development. To simplify this, usetee
to makestart_foreground
both write to stdout and log/sidekiq.log.