mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Allow assigning termination signal via /etc/default or /etc/sysconfig.
This commit is contained in:
parent
7932d455f1
commit
560be1fbd8
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ CURDIR=`pwd`
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 <appname> {start|stop|quit} <environment> <conf_file>"
|
echo "Usage: $0 <appname> {start|stop|quit} <environment> <conf_file>"
|
||||||
echo -e "\nstop) is a synonym for quit"
|
echo -e "\nstop) is a synonym for quit"
|
||||||
echo "quit) issues -INT to request the worker to stop"
|
echo "quit) issues -$SIG to request the worker to stop"
|
||||||
echo -e "\nSee http://mperham.github.com/sidekiq/ for more details"
|
echo -e "\nSee http://mperham.github.com/sidekiq/ for more details"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,7 @@ fi
|
||||||
APP=$1 ; ACTION=$2; RACK_ENV=$3; CONF_FILE=$4;
|
APP=$1 ; ACTION=$2; RACK_ENV=$3; CONF_FILE=$4;
|
||||||
APP_HOME="/data"
|
APP_HOME="/data"
|
||||||
SIDEKIQ="sidekiq"
|
SIDEKIQ="sidekiq"
|
||||||
|
SIG="INT"
|
||||||
|
|
||||||
WORKER_REF=`echo $CONF_FILE | sed s/.yml//`
|
WORKER_REF=`echo $CONF_FILE | sed s/.yml//`
|
||||||
|
|
||||||
|
@ -169,7 +170,6 @@ if [ -d $APP_ROOT ]; then
|
||||||
stop|quit)
|
stop|quit)
|
||||||
legacy_fix
|
legacy_fix
|
||||||
lock
|
lock
|
||||||
SIG="INT"
|
|
||||||
signal_worker
|
signal_worker
|
||||||
[ -e "$LOCK_FILE" ] && rm $LOCK_FILE
|
[ -e "$LOCK_FILE" ] && rm $LOCK_FILE
|
||||||
unlock_and_exit_cleanly
|
unlock_and_exit_cleanly
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue