Commit 1d75928a authored by Terri Chu's avatar Terri Chu

Merge branch 'ashmckenzie/trap-kill-and-cleanup-for-sidekiq' into 'master'

Trap kill signal and call cleanup/stop

See merge request gitlab-org/gitlab!73447
parents d1e26539 cd675d9c
......@@ -8,6 +8,8 @@ sidekiq_pidfile="$app_root/tmp/pids/sidekiq-cluster.pid"
sidekiq_logfile="$app_root/log/sidekiq.log"
gitlab_user=$(ls -l config.ru | awk '{print $3}')
trap cleanup EXIT
warn()
{
echo "$@" 1>&2
......@@ -59,6 +61,11 @@ start_sidekiq()
${cmd} bin/sidekiq-cluster "${processes_args[@]}" -P $sidekiq_pidfile -e $RAILS_ENV "$@" 2>&1 | tee -a $sidekiq_logfile
}
cleanup()
{
stop
}
action="$1"
shift
......
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