sunspot/sunspot — Issue #105: Sunspot should support Resque
Author: nz
Created: 2011-10-12 18:07:32+00:00
State: open

See gist for queueing resque jobs in ActiveRecord objects: https://gist.github.com/1282013

1. Create jobs for Resque: `Sunspot::Resque::Update` and `Sunspot::Resque::Remove`.
2. Support a `:resque` option on `searchable` which sets `auto_index: false, auto_remove: false` and mixes in the Resque `after_commit` and `before_destroy` hooks.

This could feed its way into a more generic approach to how the index and remove calls are invoked. We could use generic `after_commit` and `before_destroy` hooks to invoke Resque, DelayedJob, or synchronous calls, based on our sensible defaults and the user's preferences.