Open phinjensen opened 6 years ago
original author: Brian Gadoury
date: 2012-07-02T19:23:34-04:00
Honestly, for all the abusive things I've done with Resque in our DevCamps setup, it's been completely solid and carefree. It has a couple advantages over the "cron job running a rake task" approach that I found really nice. But, they're probably not terribly compelling unless they're handling something that's customer-facing (or at least used in higher volume by a bunch of internal users.)
Not as a defense of Resque, but rather just for the sake of argument, here's are the main things I like about Resque that one doesn't get with a sweet and simple corn job:
An optional, simple admin UI mountable at any url with a simple config/routes.rb change. This provides good visibility into what jobs are running in what queues along with error logs and the ability to re-try failed jobs.
Multiple job queues that can be assigned multiple worker instances to manage job turn-around time
Workers stay resident and only fire when there's something to do.
Jobs are managed in (surprise!) a queue, which avoids the possibility of cron jobs backing up (because the DB had nodded off, etc) all trying to process the same files at the same time.
Naturally leads the developer to put their worker code where it's more easily testable. :P
Again, these advantages are only advantages in some use cases, and I can see the validity of the simplicity argument as well. As you personally know, we initially started using Resque because we needed to decouple file uploads from post-processing (thumbnails!) while still getting the post-processing done as quickly as possible. That's clearly not exactly what you needed here.
-Phunk
original author: Steph Skardal
date: 2012-07-03T10:07:18-04:00
Thanks for your input Phunk. It looks like you should really be writing some blog articles based on this comment, eh?
Comments for https://www.endpointdev.com/blog/2012/06/kiss-slurping-file-attachments/ By Steph Skardal
To enter a comment: