Integrate ActiveJob / DeliverLater / GlobalID with Rails

WIP.
I'll follow up with full arguments later, but I remain happy with the inclusion of rescue_from. Nobody is forcing you to use it, just like in controllers. Anyway, I'll expand the argument later, but don't remove this for now. 

> On Aug 15, 2014, at 9:01, Douwe Maan <notifications@github.com> wrote:
> 
> In activejob/test/jobs/rescue_job.rb:
> 
> > @@ -0,0 +1,20 @@
> > +class RescueJob < ActiveJob::Base
> > +  class OtherError < StandardError; end
> > +
> > +  rescue_from(ArgumentError) do
> The whole issue started because I pointed out deserialization with GlobalID could raise ActiveRecord::RecordNotFound, which would lead to an infinitely requeued job on at least Sidekiq (rails/activejob#25). After a little bit of discussion, loaning rescue_from from AC was suggested by @dhh because it would do the trick and be familiar to users.
> 
> I'm not married to #rescue_from and I agree that it introduces a couple of new issues. In the end, all I would really like is a way to handle those RecordNotFound errors that is straightforward and easy enough to be recommended to and used by less experienced AJ users who use it with GlobalID models.
> 
> If we're moving away from rescue_from, we're pretty much restarting that discussion. Do you have any input on the problem described there, any other ideas on ways to handle it?
> 
> —
> Reply to this email directly or view it on GitHub.