Skip to content

Instantly share code, notes, and snippets.

View brightball's full-sized avatar

Barry Jones brightball

View GitHub Profile
class BackgroundSessionProxy < Sunspot::SessionProxy::AbstractSessionProxy
class <<self
def async?
!!Thread.current[:background_session_proxy_async]
end
def with_async
self.async = true
begin
yield