I'm trying to start my qc workers using the runit init system on linux. Here's the script I'm using:
#!/bin/bash
cd /var/www/mysite.com/current
echo "Service PID: $$"
export PATH="/usr/local/rvm/bin:$PATH"
export rvm_user_install_flag=1
export rvm_trust_rvmrcs=1
export rvm_trust_rvmrcs_flag=1
source /usr/local/rvm/scripts/rvm
exec bundle exec rake qc:work RAILS_ENV="production" QUEUES="default,mailers"
When I start the service using runit's sv program (i.e., `sv start service`) I can see rake task running with the new PID. However, as new jobs get added to the queue they only seem to execute after I invoke `sv down service`, which according to their [manual](
marden.org/runit/sv.8.html), sends the `TERM` & `CONT` signals.
I'm looking through the source code and comparing it to delayed_job which seems to accommodate the `exec` command on it's rake task. But I'm not knowledgeable enough to come to any conclusions, hopefully somebody else can chime in here or point me in the right direction.