Esempio n. 1
0
    def tearDown(self):
        for o in Webapp.objects.all():
            o.delete()
        for o in Extension.objects.all():
            o.delete()
        super(TestMultiSearchView, self).tearDown()

        # Make sure to delete and unindex *all* things. Normally we wouldn't
        # care about stray deleted content staying in the index, but they can
        # have an impact on relevancy scoring so we need to make sure. This
        # needs to happen after super() has been called since it'll process the
        # indexing tasks that should happen post_request, and we need to wait
        # for ES to have done everything before continuing.
        Webapp.get_indexer().unindexer(_all=True)
        Extension.get_indexer().unindexer(_all=True)
        HomescreenIndexer.unindexer(_all=True)
        self.refresh(('webapp', 'extension', 'homescreen'))
Esempio n. 2
0
def unindex_webapps(ids, **kw):
    # DEPRECATED: call WebappIndexer.unindexer directly.
    HomescreenIndexer.unindexer(ids)
    WebappIndexer.unindexer(ids)
Esempio n. 3
0
def unindex_webapps(ids, **kw):
    # DEPRECATED: call WebappIndexer.unindexer directly.
    HomescreenIndexer.unindexer(ids)
    WebappIndexer.unindexer(ids)