Integrate ActiveJob / DeliverLater / GlobalID with Rails

WIP.
We are just testing the integration of that library. Hence why there are no tests for all the permutations of reacue_from, just a single test for it. 

> On Aug 14, 2014, at 19:03, Aaron Patterson <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
> @dhh if this code is from AP, then what are we testing? If we know rescue_from works, why are we testing it?
> 
> Besides that, it seems like a great way to accidentally create an infinite loop:
> 
> require 'active_job'
> 
> class RescueJob < ActiveJob::Base
>   rescue_from(ArgumentError) do
>     arguments[0] = "DIFFERENT!"
>     retry_now
>   end
> 
>   def perform(name)
>     my_helper # oops! I forgot the arg
>   end
> 
>   def my_helper(name)
>     puts "Hello: #{name}"
>   end
> end
> 
> RescueJob.new.execute(SecureRandom.uuid)
> @DouweM I don't actually see a place where deserialization will raise an exception, but presumably you could implement execute and call super with a begin / rescue.
> 
> —
> Reply to this email directly or view it on GitHub.