Re: [capistrano] Running resque:work from capistrano.

2011-05-11 Thread Lee Hambley
I recommend that you don't start jobs 'blind' from capistrano, and instead
use capistrano to control a server-side process monitoring daemon such as
monit, resque even comes with a sample monit file.

Also if that's not desirable, http://en.wikipedia.org/wiki/Nohup - quoting
from the wiki page: "*nohup* is a POSIX
 command
to ignore the HUP  (hangup) signal,
enabling the command to keep running after the user who issues the command
has logged out" (effectively once your capistrano command hangs up, and
finishes)

- Lee

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to capistrano@googlegroups.com
* To unsubscribe from this group, send email to 
capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Re: [capistrano] Running resque:work from capistrano.

2011-05-11 Thread Russ Knaley
Have you tried screen

On May 11, 2011, at 7:33 PM, sreid  wrote:

> I'm so far unable to run a rake task -  resque:work - from capistrano,
> so that it keeps running as a background process when the capistrano
> ssh session terminates. I've tried various combinations of nohup,
> setsid, disown etc., but nothing works. Any ideas ?
> 
> A typical command sequence might be :
> 
> cd $1
> export RAILS_ENV=production
> nohup bundle exec rake resque:work QUEUE=$2 >/dev/null 2>&1 &
> 
> This works ok in a putty session, but not via capistrano.
> 
> -- 
> * You received this message because you are subscribed to the Google Groups 
> "Capistrano" group.
> * To post to this group, send email to capistrano@googlegroups.com
> * To unsubscribe from this group, send email to 
> capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/capistrano?hl=en

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to capistrano@googlegroups.com
* To unsubscribe from this group, send email to 
capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en


Re: [capistrano] Running resque:work from capistrano.

2011-05-11 Thread Donovan Bray
we use God as our runner for both unicorn and resque

on the box we use a single init script to start God.  God then is
responsible for starting our app.

In the deploy scripts we interact with god, and we don't have this issue
since god is already daemonized and theres no shell to send a hup to resque.

This method has been working so well in wrangling unicorn and resque, I've
just got done writing in control of our redis, and I think I'll add in
nginx, and remove all of those start scripts.  So God is the single init
script on the box, and it can start and control the whole application
environment.

If you don't like god, consider bluepill or monit.  You'll end up liking the
extra monitoring and advanced notification and remediation that a management
layer like that can provide.

On Wed, May 11, 2011 at 4:33 PM, sreid  wrote:

> I'm so far unable to run a rake task -  resque:work - from capistrano,
> so that it keeps running as a background process when the capistrano
> ssh session terminates. I've tried various combinations of nohup,
> setsid, disown etc., but nothing works. Any ideas ?
>
> A typical command sequence might be :
>
> cd $1
> export RAILS_ENV=production
> nohup bundle exec rake resque:work QUEUE=$2 >/dev/null 2>&1 &
>
> This works ok in a putty session, but not via capistrano.
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to capistrano@googlegroups.com
> * To unsubscribe from this group, send email to
> capistrano+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/capistrano?hl=en

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to capistrano@googlegroups.com
* To unsubscribe from this group, send email to 
capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en