Bluepill + resque, again

306 views
Skip to first unread message

spidaman

unread,
Jun 10, 2011, 1:37:37 PM6/10/11
to Bluepill
Looks like there was a thread about this a few months ago but no
response to the question of how to run resque under bluepill such that
workers can be reliably stopped. My setup varies a bit from others in
that I'm not using resque in conjunction with rails but other than
that, there's nothing fancy going on there. Here's a pill file that
I'm generating out of chef https://gist.github.com/1019302
... any fully worked examples of a pill file to run resque workers
that can reliably stop them?

Akzhan Abdulin

unread,
Jun 10, 2011, 2:00:45 PM6/10/11
to bluep...@googlegroups.com
I have no resque so cannot help. But I always review pull requests.

2011/6/10 spidaman <spidam...@gmail.com>

Blake Watters

unread,
Jun 10, 2011, 2:17:35 PM6/10/11
to bluep...@googlegroups.com
I would strongly suggest that you take a look at the Resque-Pool gem. It's a very simple, reliable way to manage a pool of Resque workers and works with Ruby Enterprise CoW. Here's my recipe:

# Resque Pool
  app.process "resque-pool" do |process|
    process.pid_file = pid_path("resque-pool")
    process.start_command = "resque-pool -E #{rails_env} -c config/resque-pool/staging.yml -o log/resque-pool.log -e log/resque-pool.log"
    process.stop_command = "kill -TERM {{PID}}"
    process.daemonize = true
    process.start_grace_time = 30.seconds
    process.restart_grace_time = 45.seconds
  end
Blake Watters
Two Toasters | CTO

spidaman

unread,
Jun 10, 2011, 5:03:58 PM6/10/11
to Bluepill
I'll check it out again, when I looked at it initially it seemed rails
and monit.d oriented (I'm not using either) but growing the worker
pool in a memory conservative way is certainly compelling. Thanks!


On Jun 10, 11:17 am, Blake Watters <bl...@twotoasters.com> wrote:
> I would strongly suggest that you take a look at the Resque-Pool gem. It's a
> very simple, reliable way to manage a pool of Resque workers and works with
> Ruby Enterprise CoW. Here's my recipe:
>
> # Resque Pool
>   app.process "resque-pool" do |process|
>     process.pid_file = pid_path("resque-pool")
>     process.start_command = "resque-pool -E #{rails_env} -c
> config/resque-pool/staging.yml -o log/resque-pool.log -e
> log/resque-pool.log"
>     process.stop_command = "kill -TERM {{PID}}"
>     process.daemonize = true
>     process.start_grace_time = 30.seconds
>     process.restart_grace_time = 45.seconds
>   end
>
> On Fri, Jun 10, 2011 at 1:37 PM, spidaman <spidaman.l...@gmail.com> wrote:
> > Looks like there was a thread about this a few months ago but no
> > response to the question of how to run resque under bluepill such that
> > workers can be reliably stopped. My setup varies a bit from others in
> > that I'm not using resque in conjunction with rails but other than
> > that, there's nothing fancy going on there. Here's a pill file that
> > I'm generating out of chefhttps://gist.github.com/1019302
> > ... any fully worked examples of a pill file to run resque workers
> > that can reliably stop them?
>
>  *Blake Watters*
Reply all
Reply to author
Forward
0 new messages