Re:ActiveJob – gem for defining background jobs in Rails
by igravious on Sunday May 18, 2014 @12:51PM
(#7763520)
I see, cron is absolute time events (every 5 minutes say or 2 minutes past the hour or once a week) and Active Job standardizes an interface to queue events relatively (5 minutes from this HTTP request, ten minutes from now). Is there a way cron could be extended to handle the relative case?
[ Parent
| on HN ]
Re:ActiveJob – gem for defining background jobs in Rails
by tomblomfield on Sunday May 18, 2014 @01:46PM
(#7763700)
The main value of these systems is normally not "relative queuing" (although that is sometimes done).
Often, there are certain activities you might want to do in a way that doesn't block the request/response cycle, but still have them performed as soon as possible. For example, a user buys a widget on your site - send a receipt email. You don't want the "Thanks for buying" success page response to wait for your servers to compose & send the email, so you offload the email to your queue system.