spree/spree — pull request #5725 by BenMorganIO (2014-12-07 02:43:35+00:00)
Title: use active job for creating stock items

This one is going to break some tests :)

Here, I've moved stock item creation out into a job. This is because it takes, on my development machine, ~2 minutes to complete.

Version 0 (Rails 4.1 compatible) uses `enqueue` to perform jobs. I am currently using version 0 of Active Job with Spree 2.4 and its working fine. In Rails 4.2, the method for adding jobs to the queue was renamed to `perform_later`.

I think there's a lot of work to be done, but I feel like this is the first step in trying to get AJ into Spree for performance reasons.

I'm thinking of having a `defined? ActiveJob` check so that users can cherry-pick this code into Spree 2.4.

Thoughts?