Sorry this page looks weird. It was automatically migrated from my old blog, which had a different layout and different CSS.

Easy Long-Running Tasks In Rails

The Old Sessions House

On Monday night I spoke at the London Ruby User Group on handling long-running tasks in Rails. No fights broke out so I considered it a success.

In a month or so, I’ll return to my people and give an expanded version at Scotland on Rails. The skepticism and incredulity I encountered at LRUG will guide me as I hone my material.

I’m not posting my slides because, by design, they make no sense on their own. If you’d like them anyway, get in touch and I’ll send them to you.

Incidentally, for anyone who was there, my conclusion was: Background Job, also known as BJ, by Ara T Howard.

Here’s an example of using BJ to upload files to Amazon S3 via attachment_fu.

Comments

What about: http://backgroundrb.rubyforge.org/ ?

Peter • 29 March 2008

Peter, BackgrounDRb is always worth considering. It’s one of the few tools, if not the only one, that supports scheduling, and of course it’s been around for a while.

On the other hand, it’s quite “heavy”: there’s a learning curve, some configuration is required, and your worker classes must subclass BackgrounDRb classes.

All these tools make different trade-offs, and what suits one situation better may not suit another as well. I have always found BackgroundJob to work best for me. Your experience may well differ.

Andy Stewart • 29 March 2008

Andrew Stewart • 14 March 2008 • Rails
You can reach me by email or on Twitter.