views:

1063

answers:

7

It's been a while since I've last used backgrounding in Rails. I've use backgroundrb and bj before. Is there anything else that manages background tasks better?

+1  A: 

Although I haven't used it (yet!) job_fu looks really promising:

http://github.com/jnstq/job_fu/tree/master

It's persistent and uses the DB for its queue.

Olly
+1  A: 

You should check out 'Whenever', it's a cron job manager, uses very nice & clean syntax:

http://github.com/javan/whenever/

cloudhead
+1  A: 

Spawn has worked very well for me. The API is about as simple as you can get. In your long-running controller or model method:

  spawn do
    logger.info("I feel sleepy...")
    sleep 11
    logger.info("Time to wake up!")
  end

Spawn offers both forking and threading, depending on what you're trying to do. It also appears to be actively maintained by its author.

Rich Apodaca
+1  A: 

I've used bj in the past with success. However, I've heard good things about Delayed Job recently. Places like Heroku are offering it.

Callmeed
I ended up going with bj. However, with rails 2.1+ there are some issues with timezones. To fix it, you have to modify some of the plug-in code.
Chris Rittersdorf
+1  A: 

Starling and workling are good combo. I know Starling has good a bad rap with the whole twitter thing, but for most rails apps it is fine. Also with Workling you don't have to use Starling as the queue, it also uses AMQP stuff, but this is more easily integrated into an environment that uses EventMachine, like thin or Evented Mongrel, so if you are using Passenger it's a bit more difficult.

That means though if you want to use AMQP that you can use lightning fast queues like RabbitMQ, and if you want to use that queue there are other ways to integrate with it, Carrot and Warren come to mind.

I like Starling and Workling, dead simple to setup and really easy to use. Find info here on github.

railsninja
A: 

Maybe have a look at Skynet:

http://skynet.rubyforge.org/

I friend has used it and it seems, easy to install and very robust.

Ben...

A: 

We've had success with Sweat Shop

Scott