<commit_before>from celery.task import task

from elasticgit import EG
from unicore.content.models import Page, Category, Localisation


@task(ignore_result=True, serializer='json')
def fastforward(repo_path, index_prefix):
    workspace = EG.workspace(repo_path, index_prefix=index_prefix)
    workspace.fast_forward()
    workspace.reindex(Page)
    workspace.reindex(Category)
    workspace.reindex(Localisation)<commit_msg>make sure pyramid tasks load celery with the correct config<commit_after>from pyramid_celery import celery_app as app

from elasticgit import EG
from unicore.content.models import Page, Category, Localisation


@app.task(ignore_result=True, serializer='json')
def fastforward(repo_path, index_prefix):
    workspace = EG.workspace(repo_path, index_prefix=index_prefix)
    workspace.fast_forward()
    workspace.reindex(Page)
    workspace.reindex(Category)
    workspace.reindex(Localisation)
{'fraction_non_alphanumeric': 0.08260869565217391, 'fraction_numerical': 0.0, 'mean_word_length': 6.309523809523809, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7166458', 'n_tokens_mistral': 278, 'n_tokens_neox': 271, 'n_words': 62}