@cronjobs.register
def reindex_users_that_contributed_yesterday():
    if settings.STAGE:
        return

    today = datetime.now()
    yesterday = today - timedelta(days=1)

    # Support Forum answers
    user_ids = list(Answer.objects.filter(
        created__gte=yesterday,
        created__lt=today).values_list('creator_id', flat=True))

    # KB Edits
    user_ids += list(Revision.objects.filter(
        created__gte=yesterday,
        created__lt=today).values_list('creator_id', flat=True))

    # KB Reviews
    user_ids += list(Revision.objects.filter(
        reviewed__gte=yesterday,
        reviewed__lt=today).values_list('reviewer_id', flat=True))

    # Note:
    # Army of Awesome replies are live indexed. No need to do anything here.

    index_task.delay(UserMappingType, list(set(user_ids)))
Update the users (in ES) that contributed yesterday.
dataset/ETHPy150Open mozilla/kitsune/kitsune/users/cron.py/reindex_users_that_contributed_yesterday