예제 #1
0
def index_webapps(ids, **kw):
    # DEPRECATED: call WebappIndexer.index_ids directly.
    homescreens = set(
        Webapp.tags.through.objects.filter(
            webapp_id__in=ids,
            tag__tag_text='homescreen').values_list('webapp_id', flat=True))
    webapps = set(ids) - homescreens
    if homescreens:
        HomescreenIndexer.index_ids(list(homescreens), no_delay=True)
    if webapps:
        WebappIndexer.index_ids(list(webapps), no_delay=True)
예제 #2
0
파일: tasks.py 프로젝트: mrheides/zamboni
def index_webapps(ids, **kw):
    # DEPRECATED: call WebappIndexer.index_ids directly.
    homescreens = set(
        Webapp.tags.through.objects.filter(
            webapp_id__in=ids,
            tag__tag_text='homescreen')
        .values_list('webapp_id', flat=True))
    webapps = set(ids) - homescreens
    if homescreens:
        HomescreenIndexer.index_ids(list(homescreens), no_delay=True)
    if webapps:
        WebappIndexer.index_ids(list(webapps), no_delay=True)
예제 #3
0
def index_webapps(ids, **kw):
    # DEPRECATED: call WebappIndexer.index_ids directly.
    WebappIndexer.index_ids(ids, no_delay=True)
예제 #4
0
def index_webapps(ids, **kw):
    # DEPRECATED: call WebappIndexer.index_ids directly.
    WebappIndexer.index_ids(ids, no_delay=True)
예제 #5
0
파일: models.py 프로젝트: shahbaz17/zamboni
def update_search_index(sender, instance, **kwargs):
    WebappIndexer.index_ids([instance.webapp_id])
예제 #6
0
파일: models.py 프로젝트: shahbaz17/zamboni
def tarako_failed(review):
    """Remove the tarako tag from the app."""
    tag = Tag(tag_text='tarako')
    tag.remove_tag(review.app)
    WebappIndexer.index_ids([review.app.pk])
예제 #7
0
파일: models.py 프로젝트: shahbaz17/zamboni
def tarako_passed(review):
    """Add the tarako tag to the app."""
    tag = Tag(tag_text='tarako')
    tag.save_tag(review.app)
    WebappIndexer.index_ids([review.app.pk])
예제 #8
0
def update_search_index(sender, instance, **kwargs):
    WebappIndexer.index_ids([instance.addon_id])
예제 #9
0
def tarako_failed(review):
    """Remove the tarako tag from the app."""
    tag = Tag(tag_text='tarako')
    tag.remove_tag(review.app)
    WebappIndexer.index_ids([review.app.pk])
예제 #10
0
def tarako_passed(review):
    """Add the tarako tag to the app."""
    tag = Tag(tag_text='tarako')
    tag.save_tag(review.app)
    WebappIndexer.index_ids([review.app.pk])