import haystack
from haystack.signals import RealtimeSignalProcessor
from django.db.models import signals
from ..utils import check_solr
_old_sp = None


def setup():
    check_solr()
    global _old_sp
    _old_sp = haystack.signal_processor
    haystack.signal_processor = RealtimeSignalProcessor(haystack.
        connections, haystack.connection_router)


def teardown():
    haystack.signal_processor = _old_sp
    signals.post_save.receivers = []
    signals.post_delete.receivers = []

4432b06769b3715c8465bdf25e125285f3698b7f
<mask token>


def setup():
    check_solr()
    global _old_sp
    _old_sp = haystack.signal_processor
    haystack.signal_processor = RealtimeSignalProcessor(haystack.
        connections, haystack.connection_router)


<mask token>

<mask token>


def setup():
    check_solr()
    global _old_sp
    _old_sp = haystack.signal_processor
    haystack.signal_processor = RealtimeSignalProcessor(haystack.
        connections, haystack.connection_router)


def teardown():
    haystack.signal_processor = _old_sp
    signals.post_save.receivers = []
    signals.post_delete.receivers = []

<mask token>
_old_sp = None


def setup():
    check_solr()
    global _old_sp
    _old_sp = haystack.signal_processor
    haystack.signal_processor = RealtimeSignalProcessor(haystack.
        connections, haystack.connection_router)


def teardown():
    haystack.signal_processor = _old_sp
    signals.post_save.receivers = []
    signals.post_delete.receivers = []

import haystack
from haystack.signals import RealtimeSignalProcessor
from django.db.models import signals
from ..utils import check_solr
_old_sp = None


def setup():
    check_solr()
    global _old_sp
    _old_sp = haystack.signal_processor
    haystack.signal_processor = RealtimeSignalProcessor(haystack.
        connections, haystack.connection_router)


def teardown():
    haystack.signal_processor = _old_sp
    signals.post_save.receivers = []
    signals.post_delete.receivers = []
