2013-02-19 00:19:14 -05:00
|
|
|
# /etc/init/workers.conf - manage a set of Sidekiqs
|
|
|
|
|
2019-10-11 11:52:28 -04:00
|
|
|
# This example config should work with Ubuntu 14.10 and below It
|
2013-02-19 00:19:14 -05:00
|
|
|
# allows you to manage multiple Sidekiq instances with
|
|
|
|
# Upstart, Ubuntu's native service management tool.
|
|
|
|
#
|
|
|
|
# See sidekiq.conf for how to manage a single Sidekiq instance.
|
|
|
|
#
|
|
|
|
# Use "stop workers" to stop all Sidekiq instances.
|
|
|
|
# Use "start workers" to start all instances.
|
|
|
|
# Use "restart workers" to restart all instances.
|
|
|
|
# Crazy, right?
|
|
|
|
#
|
|
|
|
|
|
|
|
description "manages the set of sidekiq processes"
|
|
|
|
|
|
|
|
# This starts upon bootup and stops on shutdown
|
|
|
|
start on runlevel [2345]
|
|
|
|
stop on runlevel [06]
|
|
|
|
|
|
|
|
# Set this to the number of Sidekiq processes you want
|
|
|
|
# to run on this machine
|
|
|
|
env NUM_WORKERS=2
|
|
|
|
|
|
|
|
pre-start script
|
2014-12-07 18:01:52 -05:00
|
|
|
for i in `seq 1 ${NUM_WORKERS}`
|
2013-02-19 00:19:14 -05:00
|
|
|
do
|
|
|
|
start sidekiq index=$i
|
|
|
|
done
|
|
|
|
end script
|
2015-07-08 08:21:02 -04:00
|
|
|
|
|
|
|
post-stop script
|
|
|
|
for i in `seq 1 ${NUM_WORKERS}`
|
|
|
|
do
|
|
|
|
stop sidekiq index=$i
|
|
|
|
done
|
|
|
|
end script
|