Open travisp opened 9 years ago
Sidekiq uses threads to handle multiple workers, and the without_proxy helper is not threadsafe because it modifies Sunspot.session. The Sunspot::Queue::Sidekiq job workers can be modified to work safely like this:
def perform(klass, id) object = constantize(klass).find(id) base_session = Sunspot.session.session base_session.index(object) end
Sidekiq uses threads to handle multiple workers, and the without_proxy helper is not threadsafe because it modifies Sunspot.session. The Sunspot::Queue::Sidekiq job workers can be modified to work safely like this: